Polaris FHIR Implementation Guide
1.9.2 - ci-build
Polaris FHIR Implementation Guide - Local Development build (v1.9.2) built by the FHIR (HL7® FHIR® Standard) Build Tools. See the Directory of published versions
| Draft as of 2025-07-23 |
FSH source of the polaris-core-document-bundle resource profile.
// =============================================================================
// THIS IS A DRAFT PROPOSAL - NOT YET APPROVED FOR PRODUCTION USE
// =============================================================================
// StructureDefinition-polaris-core-document-bundle.fsh
// Polaris Clinical Document Bundle Profile
// Version 1.0 - July 23, 2025
Profile: PolarisCoreDocumentBundle
Parent: Bundle
Id: polaris-core-document-bundle
Title: "Polaris Clinical Document Bundle Core"
Description: "A FHIR Bundle representing a complete clinical document with embedded sections and recursive containment capabilities"
* ^status = #draft
* ^version = "1.0.0"
* ^date = "2025-07-23"
* ^publisher = "Polaris FHIR Implementation Guide"
* ^contact.telecom.system = #url
* ^contact.telecom.value = "https://fhir.apps.health"
* ^purpose = "Provides a comprehensive FHIR Bundle profile for clinical documents supporting text, form, canvas, and file attachment sections with unlimited recursive containment"
* ^copyright = "Copyright 2025 Polaris FHIR Implementation Guide"
// Bundle type must be document
* type = #document
* type ^short = "Bundle type is 'document'"
* type ^definition = "Indicates this bundle represents a clinical document"
// Bundle identifier for document versioning
* identifier 0..1 MS
* identifier ^short = "Business identifier for document version tracking"
* identifier ^definition = "Unique identifier for this specific version of the document"
// Bundle timestamp for document assembly
* timestamp 1..1 MS
* timestamp ^short = "When the bundle was assembled"
* timestamp ^definition = "Timestamp when this document bundle was created/last modified"
// First entry must be Composition
* entry 1..* MS
* entry ^slicing.discriminator.type = #type
* entry ^slicing.discriminator.path = "resource"
* entry ^slicing.rules = #open
* entry ^slicing.description = "First entry must be Composition, followed by all referenced resources"
* entry contains composition 1..1 MS
* entry[composition] ^short = "The composition resource - must be first entry"
* entry[composition].resource 1..1 MS
* entry[composition].resource only PolarisCoreComposition
// All other entries are supporting resources
* entry contains supportingResources 0..* MS
* entry[supportingResources] ^short = "All resources referenced by the composition"
* entry[supportingResources].resource 1..1 MS
// Bundle signature for document attestation
* signature 0..1 MS
* signature ^short = "Digital signatures for document attestation"
* signature ^definition = "Digital signatures providing clinical attestation and document integrity"
// Invariant: All references must be contained within bundle
Invariant: bundle-integrity
Description: "All references within the bundle must point to resources contained within the same bundle"
Severity: #error
Expression: "Bundle.entry.resource.descendants().where($this is Reference).all(reference.startsWith('#') or Bundle.entry.fullUrl.contains(reference))"