SGHI FHIR Profile Implementation Guide
0.1.0 - ci-build

SGHI FHIR Profile Implementation Guide, published by Kathurima Kimathi. This guide is not an authorized publication; it is the continuous build for version 0.1.0 built by the FHIR (HL7® FHIR® Standard) CI Build. This version is based on the current content of https://github.com/savannahghi/sil_fhir_profile_ig/ and changes regularly. See the Directory of published versions

## Data Type Profile: SGHI Reference

Official URL: https://fhir.slade360.co.ke/fhir/StructureDefinition/reference | Version: 0.1.0
Draft as of 2026-05-21 | Computable Name: SGHIReference

SGHI Reference

Usages:

- Use this DataType Profile: SGHI Activity Defintion Profile, SGHI AllergyIntolerance, SGHI Annotation, SGHI Appointment Profile... Show 26 more, SGHI Care Plan, SGHI CodeableReference, SGHI Composition, SGHI Condition, SGHI Consent, SGHI DiagnosticReport, SGHI DocumentReference Profile., SGHI Encounter, SGHI EpisodeOfCare, SGHI Location, SGHI Medication, SGHI Medication Dispense, SGHI MedicationRequest, SGHI Observation, SGHI Organization, SGHI Patient, SGHI Plan Definition Profile, SGHI Practitioner, SGHI PractitionerRole, SGHI Procedure, SGHI QuestionnaireResponse, SGHI RiskAssessment, SGHI ServiceRequest, SGHI Specimen, SGHI Substance and SGHI Task

You can also check for usages in the FHIR IG Statistics

### Formal Views of Profile Content

Description of Profiles, Differentials, Snapshots and how the different presentations work.

- Key Elements Table
- Differential Table
- Snapshot Table
- Statistics/References
- All

Name | Flags | Card. | Type | Description & Constraints Filter: Bindings Constraints Obligations
--- | --- | --- | --- | ---
Reference | C | 0..* | Reference | A reference from one resource to another Constraints: ref-1, ref-2
reference | Σ C | 1..1 | string | Literal reference, Relative, internal or absolute URL
Documentation for this format

#### Constraints

Id | Grade | Path(s) | Description | Expression
ele-1 | error | **ALL** elements | All FHIR elements must have a @value or children | `hasValue() or (children().count() > id.count())`
ref-1 | error | Reference | SHALL have a contained resource if a local reference is provided | `reference.exists() implies (reference.startsWith('#').not() or (reference.substring(1).trace('url') in %rootResource.contained.id.trace('ids')) or (reference='#' and %rootResource!=%resource))`
ref-2 | error | Reference | At least one of reference, identifier and display SHALL be present (unless an extension is provided). | `reference.exists() or identifier.exists() or display.exists() or extension.exists()`

This structure is derived from Reference

Name | Flags | Card. | Type | Description & Constraints Filter: Bindings Constraints Obligations
--- | --- | --- | --- | ---
Reference |  |  | Reference |
reference |  | 1..1 | string | Literal reference, Relative, internal or absolute URL
Documentation for this format

Name | Flags | Card. | Type | Description & Constraints Filter: Bindings Constraints Obligations
--- | --- | --- | --- | ---
Reference | C | 0..* | Reference | A reference from one resource to another Constraints: ref-1, ref-2
id |  | 0..1 | id | Unique id for inter-element referencing
extension |  | 0..* | Extension | Additional content defined by implementations Slice: Unordered, Open by value:url
reference | Σ C | 1..1 | string | Literal reference, Relative, internal or absolute URL
type | Σ | 0..1 | uri | Type the reference refers to (e.g. "Patient") - must be a resource in resources Binding: ResourceType (extensible): Aa resource (or, for logical models, the URI of the logical model).
identifier | Σ C | 0..1 | Identifier | Logical reference, when literal reference is not known
display | Σ C | 0..1 | string | Text alternative for the resource
Documentation for this format

#### Terminology Bindings

Path | Status | Usage | ValueSet | Version | Source
Reference.type | Base | extensible | Resource Types | 📍5.0.0 | FHIR Std.

#### Constraints

Id | Grade | Path(s) | Description | Expression
ele-1 | error | **ALL** elements | All FHIR elements must have a @value or children | `hasValue() or (children().count() > id.count())`
ext-1 | error | **ALL** extensions | Must have either extensions or value[x], not both | `extension.exists() != value.exists()`
ref-1 | error | Reference | SHALL have a contained resource if a local reference is provided | `reference.exists() implies (reference.startsWith('#').not() or (reference.substring(1).trace('url') in %rootResource.contained.id.trace('ids')) or (reference='#' and %rootResource!=%resource))`
ref-2 | error | Reference | At least one of reference, identifier and display SHALL be present (unless an extension is provided). | `reference.exists() or identifier.exists() or display.exists() or extension.exists()`

This structure is derived from Reference

Summary

Mandatory: 1 element

Key Elements View

Name | Flags | Card. | Type | Description & Constraints Filter: Bindings Constraints Obligations
--- | --- | --- | --- | ---
Reference | C | 0..* | Reference | A reference from one resource to another Constraints: ref-1, ref-2
reference | Σ C | 1..1 | string | Literal reference, Relative, internal or absolute URL
Documentation for this format

#### Constraints

Id | Grade | Path(s) | Description | Expression
ele-1 | error | **ALL** elements | All FHIR elements must have a @value or children | `hasValue() or (children().count() > id.count())`
ref-1 | error | Reference | SHALL have a contained resource if a local reference is provided | `reference.exists() implies (reference.startsWith('#').not() or (reference.substring(1).trace('url') in %rootResource.contained.id.trace('ids')) or (reference='#' and %rootResource!=%resource))`
ref-2 | error | Reference | At least one of reference, identifier and display SHALL be present (unless an extension is provided). | `reference.exists() or identifier.exists() or display.exists() or extension.exists()`

Differential View

This structure is derived from Reference

Name | Flags | Card. | Type | Description & Constraints Filter: Bindings Constraints Obligations
--- | --- | --- | --- | ---
Reference |  |  | Reference |
reference |  | 1..1 | string | Literal reference, Relative, internal or absolute URL
Documentation for this format

Snapshot View

Name | Flags | Card. | Type | Description & Constraints Filter: Bindings Constraints Obligations
--- | --- | --- | --- | ---
Reference | C | 0..* | Reference | A reference from one resource to another Constraints: ref-1, ref-2
id |  | 0..1 | id | Unique id for inter-element referencing
extension |  | 0..* | Extension | Additional content defined by implementations Slice: Unordered, Open by value:url
reference | Σ C | 1..1 | string | Literal reference, Relative, internal or absolute URL
type | Σ | 0..1 | uri | Type the reference refers to (e.g. "Patient") - must be a resource in resources Binding: ResourceType (extensible): Aa resource (or, for logical models, the URI of the logical model).
identifier | Σ C | 0..1 | Identifier | Logical reference, when literal reference is not known
display | Σ C | 0..1 | string | Text alternative for the resource
Documentation for this format

#### Terminology Bindings

Path | Status | Usage | ValueSet | Version | Source
Reference.type | Base | extensible | Resource Types | 📍5.0.0 | FHIR Std.

#### Constraints

Id | Grade | Path(s) | Description | Expression
ele-1 | error | **ALL** elements | All FHIR elements must have a @value or children | `hasValue() or (children().count() > id.count())`
ext-1 | error | **ALL** extensions | Must have either extensions or value[x], not both | `extension.exists() != value.exists()`
ref-1 | error | Reference | SHALL have a contained resource if a local reference is provided | `reference.exists() implies (reference.startsWith('#').not() or (reference.substring(1).trace('url') in %rootResource.contained.id.trace('ids')) or (reference='#' and %rootResource!=%resource))`
ref-2 | error | Reference | At least one of reference, identifier and display SHALL be present (unless an extension is provided). | `reference.exists() or identifier.exists() or display.exists() or extension.exists()`

This structure is derived from Reference

Summary

Mandatory: 1 element

Other representations of profile: CSV, Excel, Schematron