NCPI FHIR Implementation Guide v2
0.1.0 - ci-build

NCPI FHIR Implementation Guide v2 - Local Development build (v0.1.0) built by the FHIR (HL7® FHIR® Standard) Build Tools. See the Directory of published versions

Resource Profile: NcpiFile - Detailed Descriptions

Draft as of 2025-03-24

Definitions for the ncpi-file resource profile.

Guidance on how to interpret the contents of this table can be found here

0. DocumentReference
Definition

A reference to a document of any kind for any purpose. Provides metadata about the document so that the document can be discovered and managed. The scope of a document is any seralized object with a mime-type, so includes formal patient centric documents (CDA), cliical notes, scanned paper, and non-patient specific documents like policy text.

ShortA reference to a document
Comments

Usually, this is used for documents other than those defined by FHIR.

Control0..*
Is Modifierfalse
Must Supportfalse
Summaryfalse
Invariantsdom-2: If the resource is contained in another resource, it SHALL NOT contain nested Resources (contained.contained.empty())
dom-3: If the resource is contained in another resource, it SHALL be referred to from elsewhere in the resource or SHALL refer to the containing resource (contained.where(((id.exists() and ('#'+id in (%resource.descendants().reference | %resource.descendants().as(canonical) | %resource.descendants().as(uri) | %resource.descendants().as(url)))) or descendants().where(reference = '#').exists() or descendants().where(as(canonical) = '#').exists() or descendants().where(as(uri) = '#').exists()).not()).trace('unmatched', id).empty())
dom-4: If a resource is contained in another resource, it SHALL NOT have a meta.versionId or a meta.lastUpdated (contained.meta.versionId.empty() and contained.meta.lastUpdated.empty())
dom-5: If a resource is contained in another resource, it SHALL NOT have a security label (contained.meta.security.empty())
dom-6: A resource should have narrative for robust management (text.`div`.exists())
2. DocumentReference.implicitRules
Definition

A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.

ShortA set of rules under which this content was created
Comments

Asserting this rule set restricts the content to be only understood by a limited set of trading partners. This inherently limits the usefulness of the data in the long term. However, the existing health eco-system is highly fractured, and not yet ready to define, collect, and exchange data in a generally computable sense. Wherever possible, implementers and/or specification writers should avoid using this element. Often, when used, the URL is a reference to an implementation guide that defines these special rules as part of it's narrative along with other profiles, value sets, etc.

Control0..1
Typeuri
Is Modifiertrue because This element is labeled as a modifier because the implicit rules may provide additional knowledge about the resource that modifies it's meaning or interpretation
Primitive ValueThis primitive element may be present, or absent, or replaced by an extension
Must Supportfalse
Summarytrue
Invariantsele-1: All FHIR elements must have a @value or children (hasValue() or (children().count() > id.count()))
4. DocumentReference.extension
Definition

An Extension


May be used to represent additional information that is not part of the basic definition of the resource. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.

ShortExtensionAdditional content defined by implementations
Comments

There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.

Control20..*
TypeExtension
Is Modifierfalse
Must Supportfalse
Summaryfalse
Alternate Namesextensions, user content
Invariantsele-1: All FHIR elements must have a @value or children (hasValue() or (children().count() > id.count()))
ext-1: Must have either extensions or value[x], not both (extension.exists() != value.exists())
SlicingThis element introduces a set of slices on DocumentReference.extension. The slices areUnordered and Open, and can be differentiated using the following discriminators:
  • value @ url
  • 6. DocumentReference.extension:file-format
    Slice Namefile-format
    Definition

    The file format used

    ShortThe file format used (EDAM is preferred)
    Control1..1
    This element is affected by the following invariants: ele-1
    TypeExtension(The file format used) (Extension Type: CodeableConcept)
    Is Modifierfalse
    Must Supportfalse
    Invariantsele-1: All FHIR elements must have a @value or children unless an empty Parameters resource (hasValue() or (children().count() > id.count()) or $this is Parameters)
    ext-1: Must have either extensions or value[x], not both (extension.exists() != value.exists())
    ele-1: All FHIR elements must have a @value or children (hasValue() or (children().count() > id.count()))
    ext-1: Must have either extensions or value[x], not both (extension.exists() != value.exists())
    8. DocumentReference.extension:location-access
    Slice Namelocation-access
    Definition

    If present, only those under the specific Access Policy can access the file in this location.

    ShortIf present, only those under the specific Access Policy can access the file in this location.
    Control0..*
    This element is affected by the following invariants: ele-1
    TypeExtension(If present, only those under the specific Access Policy can access the file in this location.) (Extension Type: Reference)
    Is Modifierfalse
    Must Supportfalse
    Invariantsele-1: All FHIR elements must have a @value or children unless an empty Parameters resource (hasValue() or (children().count() > id.count()) or $this is Parameters)
    ext-1: Must have either extensions or value[x], not both (extension.exists() != value.exists())
    ele-1: All FHIR elements must have a @value or children (hasValue() or (children().count() > id.count()))
    ext-1: Must have either extensions or value[x], not both (extension.exists() != value.exists())
    10. DocumentReference.extension:file-size
    Slice Namefile-size
    Definition

    The size of the file, e.g., in bytes.

    ShortIndicate the size of the file in reference
    Control1..1
    This element is affected by the following invariants: ele-1
    TypeExtension(The size of the file, e.g., in bytes.) (Extension Type: Quantity)
    Is Modifierfalse
    Must Supportfalse
    Invariantsele-1: All FHIR elements must have a @value or children unless an empty Parameters resource (hasValue() or (children().count() > id.count()) or $this is Parameters)
    ext-1: Must have either extensions or value[x], not both (extension.exists() != value.exists())
    ele-1: All FHIR elements must have a @value or children (hasValue() or (children().count() > id.count()))
    ext-1: Must have either extensions or value[x], not both (extension.exists() != value.exists())
    12. DocumentReference.extension:hash
    Slice Namehash
    Definition

    Provides a list of hashes for confirming file transfers

    ShortProvides a list of hashes for confirming file transfers
    Control0..*
    This element is affected by the following invariants: ele-1
    TypeExtension(Provides a list of hashes for confirming file transfers) (Complex Extension)
    Is Modifierfalse
    Must Supportfalse
    Invariantsele-1: All FHIR elements must have a @value or children unless an empty Parameters resource (hasValue() or (children().count() > id.count()) or $this is Parameters)
    ext-1: Must have either extensions or value[x], not both (extension.exists() != value.exists())
    14. DocumentReference.extension:content-version
    Slice Namecontent-version
    Definition

    Version of the contents of the file

    ShortThe version of the content in the file
    Control0..1
    This element is affected by the following invariants: ele-1
    TypeExtension(Version of the contents of the file) (Extension Type: string)
    Is Modifierfalse
    Must Supportfalse
    Invariantsele-1: All FHIR elements must have a @value or children unless an empty Parameters resource (hasValue() or (children().count() > id.count()) or $this is Parameters)
    ext-1: Must have either extensions or value[x], not both (extension.exists() != value.exists())
    ele-1: All FHIR elements must have a @value or children (hasValue() or (children().count() > id.count()))
    ext-1: Must have either extensions or value[x], not both (extension.exists() != value.exists())
    16. DocumentReference.modifierExtension
    Definition

    May be used to represent additional information that is not part of the basic definition of the resource and that modifies the understanding of the element that contains it and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.

    Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).

    ShortExtensions that cannot be ignored
    Comments

    There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.

    Control0..*
    TypeExtension
    Is Modifiertrue because Modifier extensions are expected to modify the meaning or interpretation of the resource that contains them
    Must Supportfalse
    Summaryfalse
    Requirements

    Modifier extensions allow for extensions that cannot be safely ignored to be clearly distinguished from the vast majority of extensions which can be safely ignored. This promotes interoperability by eliminating the need for implementers to prohibit the presence of extensions. For further information, see the definition of modifier extensions.

    Alternate Namesextensions, user content
    Invariantsele-1: All FHIR elements must have a @value or children (hasValue() or (children().count() > id.count()))
    ext-1: Must have either extensions or value[x], not both (extension.exists() != value.exists())
    18. DocumentReference.identifier
    Definition

    Other identifiers associated with the document, including version independent identifiers.

    ShortA related external file IDOther identifiers for the document
    NoteThis is a business identifier, not a resource identifier (see discussion)
    Control10..*
    TypeIdentifier
    Is Modifierfalse
    Must Supportfalse
    Summarytrue
    Invariantsele-1: All FHIR elements must have a @value or children (hasValue() or (children().count() > id.count()))
    20. DocumentReference.status
    Definition

    The status of this document reference.

    Shortcurrent | superseded | entered-in-error
    Comments

    This is the status of the DocumentReference object, which might be independent from the docStatus element.

    This element is labeled as a modifier because the status contains the codes that mark the document or reference as not currently valid.

    Control1..1
    BindingThe codes SHALL be taken from DocumentReferenceStatushttp://hl7.org/fhir/ValueSet/document-reference-status|4.3.0
    (required to http://hl7.org/fhir/ValueSet/document-reference-status|4.3.0)

    The status of the document reference.

    Typecode
    Is Modifiertrue because This element is labelled as a modifier because it is a status element that contains status entered-in-error which means that the resource should not be treated as valid
    Primitive ValueThis primitive element may be present, or absent, or replaced by an extension
    Must Supportfalse
    Summarytrue
    Invariantsele-1: All FHIR elements must have a @value or children (hasValue() or (children().count() > id.count()))
    22. DocumentReference.type
    Definition

    Specifies the particular kind of document referenced (e.g. History and Physical, Discharge Summary, Progress Note). This usually equates to the purpose of making the document referenced.

    ShortThe type of data contained in this file.Kind of document (LOINC if possible)
    Comments

    Key metadata element describing the document that describes he exact type of document. Helps humans to assess whether the document is of interest when viewing a list of documents.

    Control0..1
    BindingUnless not suitable, these codes SHALL be taken from The codes SHOULD be taken from Enumerations for the EDAM ontologyhttp://hl7.org/fhir/ValueSet/doc-typecodes
    (extensible to https://nih-ncpi.github.io/ncpi-fhir-ig-2/ValueSet/edam-ontology-terms)
    TypeCodeableConcept
    Is Modifierfalse
    Must Supportfalse
    Summarytrue
    Invariantsele-1: All FHIR elements must have a @value or children (hasValue() or (children().count() > id.count()))
    24. DocumentReference.subject
    Definition

    Who or what the document is about. The document can be about a person, (patient or healthcare practitioner), a device (e.g. a machine) or even a group of subjects (such as a document about a herd of farm animals, or a set of patients that share a common exposure).

    ShortThe participant(s) for whom this file contains data (i.e., ParticipantID)Who/what is the subject of the document
    Control10..1
    TypeReference(Patient, Practitioner, Group, Device)
    Is Modifierfalse
    Must Supportfalse
    Summarytrue
    Invariantsele-1: All FHIR elements must have a @value or children (hasValue() or (children().count() > id.count()))
    26. DocumentReference.description
    Definition

    Human-readable description of the source document.

    ShortA description of the fileHuman-readable description
    Comments

    What the document is about, a terse summary of the document.

    Control0..1
    Typestring
    Is Modifierfalse
    Primitive ValueThis primitive element may be present, or absent, or replaced by an extension
    Must Supportfalse
    Summarytrue
    Requirements

    Helps humans to assess whether the document is of interest.

    Invariantsele-1: All FHIR elements must have a @value or children (hasValue() or (children().count() > id.count()))
    28. DocumentReference.content
    Definition

    The document and format referenced. There may be multiple content element repetitions, each with a different format.

    ShortDocument referenced
    Control1..*
    TypeBackboneElement
    Is Modifierfalse
    Must Supportfalse
    Summarytrue
    Invariantsele-1: All FHIR elements must have a @value or children unless an empty Parameters resource (hasValue() or (children().count() > id.count()) or $this is Parameters)
    30. DocumentReference.content.modifierExtension
    Definition

    May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.

    Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).

    ShortExtensions that cannot be ignored even if unrecognized
    Comments

    There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.

    Control0..*
    TypeExtension
    Is Modifiertrue because Modifier extensions are expected to modify the meaning or interpretation of the element that contains them
    Summarytrue
    Requirements

    Modifier extensions allow for extensions that cannot be safely ignored to be clearly distinguished from the vast majority of extensions which can be safely ignored. This promotes interoperability by eliminating the need for implementers to prohibit the presence of extensions. For further information, see the definition of modifier extensions.

    Alternate Namesextensions, user content, modifiers
    Invariantsele-1: All FHIR elements must have a @value or children (hasValue() or (children().count() > id.count()))
    ext-1: Must have either extensions or value[x], not both (extension.exists() != value.exists())
    32. DocumentReference.content.attachment
    Definition

    The document or URL of the document along with critical metadata to prove content has integrity.

    ShortWhere to access the document
    Control1..1
    TypeAttachment
    Is Modifierfalse
    Must Supportfalse
    Summarytrue
    Invariantsele-1: All FHIR elements must have a @value or children (hasValue() or (children().count() > id.count()))
    34. DocumentReference.content.attachment.url
    Definition

    A location where the data can be accessed.

    ShortThe URI at which this data can be accessedUri where the data can be found
    Comments

    If both data and url are provided, the url SHALL point to the same content as the data contains. Urls may be relative references or may reference transient locations such as a wrapping envelope using cid: though this has ramifications for using signatures. Relative URLs are interpreted relative to the service url, like a resource reference, rather than relative to the resource itself. If a URL is provided, it SHALL resolve to actual data.

    Control10..1
    Typeurl
    Is Modifierfalse
    Primitive ValueThis primitive element may be present, or absent, or replaced by an extension
    Summarytrue
    Requirements

    The data needs to be transmitted by reference.

    Example<br/><b>General</b>:http://www.acme.com/logo-small.png
    Invariantsele-1: All FHIR elements must have a @value or children (hasValue() or (children().count() > id.count()))