Skip to content

StructureDefinitions should be published with status: active for server deployment #358

Description

@jgsuess

Summary

This issue raises awareness of the FHIR publication status requirements for StructureDefinitions deployed to HAPI FHIR servers. The downstream fhir.ph.ereferral IG (which depends on fhir.ph.core) was impacted by this — see ph-ereferral#146.

While fhir.ph.core 0.2.0 currently publishes its StructureDefinitions with status: active (confirmed working), this issue documents the requirement and the need for an orderly publication process across the PH FHIR IG ecosystem.

HAPI FHIR Server Behaviour

HAPI's package installer (PackageInstallerSvcImpl) rejects conformance resources with status != "active" by default:

// https://github.com/hapifhir/hapi-fhir/blob/master/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/packages/PackageInstallerSvcImpl.java

private boolean isValidResourceStatusForPackageUpload(IBaseResource theResource) {
    if (!myStorageSettings.isValidateResourceStatusForPackageUpload()) {
        return true;
    }
    // ...
    return switch (theResource.fhirType()) {
        default -> statusValue.equals("active");  // StructureDefinition must be "active"
    };
}

Resources with status: draft are silently skipped with a WARN log. The server then cannot find the profile for validation, returning HTTP 422 on resource submission.

FHIR R4 Specification

Per Publication Status (R4):

  • draft: "not yet considered to be ready for normal use"
  • active: "ready for normal use"
  • retired: "withdrawn or superseded"

Recommendation: Orderly Publication Lifecycle

For IGs deployed to FHIR servers (not just rendered as documentation), the publication process should ensure:

  1. Feature branches / CI buildsstatus: draft acceptable
  2. Tagged releases / published packagesstatus: active required for server deployment
  3. Superseded versionsstatus: retired

This applies to all conformance resources: StructureDefinition, ValueSet, CodeSystem, CapabilityStatement, SearchParameter, OperationDefinition.

Suggested Implementation

In SUSHI/FSH-based IGs, add to sushi-config.yaml:

status: active

Or per-resource in .fsh files:

* status = #active

Ensure CI/CD pipelines that produce package.tgz for server deployment validate that no conformance resources have status: draft.

Context

This was discovered during the June 2026 Philippines FHIR Connectathon when fhir.ph.ereferral 0.1.0 profiles failed to load into the HAPI pheref server. All 13 ereferral StructureDefinitions were status: draft and were silently skipped by the package installer.

References

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions