DHIN 2025Connectathon FHIR IG
0.2.0 - ci-build Nigeria flag

DHIN 2025Connectathon FHIR IG, published by DHIN. This guide is not an authorized publication; it is the continuous build for version 0.2.0 built by the FHIR (HL7® FHIR® Standard) CI Build. This version is based on the current content of https://github.com/Nigeria-FHIR-Community/2025Connectathon/ and changes regularly. See the Directory of published versions

Resource Profile: NG Invoice

Official URL: https://sandbox.dhin-hie.org/ig/StructureDefinition/ng-invoice Version: 0.2.0
Draft as of 2025-11-19 Computable Name: NgInvoice

Lightweight Invoice profile for pharmacy dispensing and payment in DHIN 2025 Connectathon.

Usages:

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.

NameFlagsCard.TypeDescription & Constraints    Filter: Filtersdoco
.. Invoice 0..* Invoice Invoice containing ChargeItems from an Account
... implicitRules ?!Σ 0..1 uri A set of rules under which this content was created
... modifierExtension ?! 0..* Extension Extensions that cannot be ignored
... status ?!SΣ 1..1 code draft | issued | balanced | cancelled | entered-in-error
Binding: InvoiceStatus (required): Codes identifying the lifecycle stage of an Invoice.
... subject SΣ 0..1 Reference(NG Patient) The patient this invoice is about
... date SΣ 0..1 dateTime Invoice date / posting date
... participant S 0..* BackboneElement Participant in creation of this Invoice
.... modifierExtension ?!Σ 0..* Extension Extensions that cannot be ignored even if unrecognized
.... role 0..1 CodeableConcept Role (e.g., performer, payee)
.... actor 1..1 Reference(NG Practitioner | NG Organization) Individual who was involved
... issuer S 0..1 Reference(NG Organization) Organization issuing the invoice (e.g., pharmacy)
... lineItem S 0..* BackboneElement Line items of this Invoice
.... modifierExtension ?!Σ 0..* Extension Extensions that cannot be ignored even if unrecognized
.... sequence 0..1 positiveInt Line order
.... chargeItem[x] 1..1 What is being billed (code or reference)
..... chargeItemReference Reference(ChargeItem)
..... chargeItemCodeableConcept CodeableConcept
... totalPriceComponent 0..* See priceComponent (Invoice) Invoice-level price components (e.g., subtotal, VAT)
... totalNet Σ 0..1 Money Total after adjustments
... totalGross Σ 0..1 Money Total before adjustments
... paymentTerms 0..1 markdown Payment instructions/terms

doco Documentation for this format

Terminology Bindings

Path Status Usage ValueSet Version Source
Invoice.status Base required InvoiceStatus 📍4.0.1 FHIR Std.

Constraints

Id Grade Path(s) Description Expression
dom-2 error Invoice If the resource is contained in another resource, it SHALL NOT contain nested Resources contained.contained.empty()
dom-3 error Invoice 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 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(canonical) = '#').exists()).not()).trace('unmatched', id).empty()
dom-4 error Invoice 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 error Invoice If a resource is contained in another resource, it SHALL NOT have a security label contained.meta.security.empty()
dom-6 best practice Invoice A resource should have narrative for robust management text.`div`.exists()
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()

This structure is derived from Invoice

NameFlagsCard.TypeDescription & Constraints    Filter: Filtersdoco
.. Invoice 0..* Invoice Invoice containing ChargeItems from an Account
... status S 1..1 code draft | issued | balanced | cancelled | entered-in-error
... type S 0..1 CodeableConcept Invoice category (e.g., Rx invoice)
... subject S 0..1 Reference(NG Patient) The patient this invoice is about
... participant S 0..* BackboneElement Participant in creation of this Invoice
.... role 0..1 CodeableConcept Role (e.g., performer, payee)
.... actor 1..1 Reference(NG Practitioner | NG Organization) Individual who was involved
... issuer S 0..1 Reference(NG Organization) Organization issuing the invoice (e.g., pharmacy)
... lineItem S 0..* BackboneElement Line items of this Invoice
.... sequence 0..1 positiveInt Line order
.... chargeItem[x] 1..1 Reference(ChargeItem), CodeableConcept What is being billed (code or reference)
... totalPriceComponent 0..* Invoice-level price components (e.g., subtotal, VAT)
... totalNet 0..1 Money Total after adjustments
... totalGross 0..1 Money Total before adjustments
... paymentTerms 0..1 markdown Payment instructions/terms
... note
.... text 1..1 markdown Free text note (e.g., co-pay, coverage info)

doco Documentation for this format
NameFlagsCard.TypeDescription & Constraints    Filter: Filtersdoco
.. Invoice 0..* Invoice Invoice containing ChargeItems from an Account
... id Σ 0..1 id Logical id of this artifact
... meta Σ 0..1 Meta Metadata about the resource
... implicitRules ?!Σ 0..1 uri A set of rules under which this content was created
... text 0..1 Narrative Text summary of the resource, for human interpretation
This profile does not constrain the narrative in regard to content, language, or traceability to data elements
... contained 0..* Resource Contained, inline Resources
... extension 0..* Extension Additional content defined by implementations
... modifierExtension ?! 0..* Extension Extensions that cannot be ignored
... identifier Σ 0..* Identifier Business Identifier for item
... status ?!SΣ 1..1 code draft | issued | balanced | cancelled | entered-in-error
Binding: InvoiceStatus (required): Codes identifying the lifecycle stage of an Invoice.
... cancelledReason 0..1 string Reason for cancellation of this Invoice
... type SΣ 0..1 CodeableConcept Invoice category (e.g., Rx invoice)
... subject SΣ 0..1 Reference(NG Patient) The patient this invoice is about
... recipient Σ 0..1 Reference(Organization | Patient | RelatedPerson) Recipient of this invoice
... date SΣ 0..1 dateTime Invoice date / posting date
... participant S 0..* BackboneElement Participant in creation of this Invoice
.... id 0..1 string Unique id for inter-element referencing
.... extension 0..* Extension Additional content defined by implementations
.... modifierExtension ?!Σ 0..* Extension Extensions that cannot be ignored even if unrecognized
.... role 0..1 CodeableConcept Role (e.g., performer, payee)
.... actor 1..1 Reference(NG Practitioner | NG Organization) Individual who was involved
... issuer S 0..1 Reference(NG Organization) Organization issuing the invoice (e.g., pharmacy)
... account 0..1 Reference(Account) Account that is being balanced
... lineItem S 0..* BackboneElement Line items of this Invoice
.... id 0..1 string Unique id for inter-element referencing
.... extension 0..* Extension Additional content defined by implementations
.... modifierExtension ?!Σ 0..* Extension Extensions that cannot be ignored even if unrecognized
.... sequence 0..1 positiveInt Line order
.... chargeItem[x] 1..1 What is being billed (code or reference)
..... chargeItemReference Reference(ChargeItem)
..... chargeItemCodeableConcept CodeableConcept
.... priceComponent 0..* BackboneElement Components of total line item price
..... id 0..1 string Unique id for inter-element referencing
..... extension 0..* Extension Additional content defined by implementations
..... modifierExtension ?!Σ 0..* Extension Extensions that cannot be ignored even if unrecognized
..... type 1..1 code base | surcharge | deduction | discount | tax | informational
Binding: InvoicePriceComponentType (required): Codes indicating the kind of the price component.
..... code 0..1 CodeableConcept Code identifying the specific component
..... factor 0..1 decimal Factor used for calculating this component
..... amount 0..1 Money Monetary amount associated with this component
... totalPriceComponent 0..* See priceComponent (Invoice) Invoice-level price components (e.g., subtotal, VAT)
... totalNet Σ 0..1 Money Total after adjustments
... totalGross Σ 0..1 Money Total before adjustments
... paymentTerms 0..1 markdown Payment instructions/terms
... note 0..* Annotation Comments made about the invoice
.... id 0..1 string Unique id for inter-element referencing
.... extension 0..* Extension Additional content defined by implementations
Slice: Unordered, Open by value:url
.... author[x] Σ 0..1 Individual responsible for the annotation
..... authorReference Reference(Practitioner | Patient | RelatedPerson | Organization)
..... authorString string
.... time Σ 0..1 dateTime When the annotation was made
.... text Σ 1..1 markdown Free text note (e.g., co-pay, coverage info)

doco Documentation for this format

Terminology Bindings

Path Status Usage ValueSet Version Source
Invoice.language Base preferred Common Languages 📍4.0.1 FHIR Std.
Invoice.status Base required InvoiceStatus 📍4.0.1 FHIR Std.
Invoice.lineItem.priceComponent.​type Base required InvoicePriceComponentType 📍4.0.1 FHIR Std.

Constraints

Id Grade Path(s) Description Expression
dom-2 error Invoice If the resource is contained in another resource, it SHALL NOT contain nested Resources contained.contained.empty()
dom-3 error Invoice 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 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(canonical) = '#').exists()).not()).trace('unmatched', id).empty()
dom-4 error Invoice 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 error Invoice If a resource is contained in another resource, it SHALL NOT have a security label contained.meta.security.empty()
dom-6 best practice Invoice A resource should have narrative for robust management text.`div`.exists()
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()

Key Elements View

NameFlagsCard.TypeDescription & Constraints    Filter: Filtersdoco
.. Invoice 0..* Invoice Invoice containing ChargeItems from an Account
... implicitRules ?!Σ 0..1 uri A set of rules under which this content was created
... modifierExtension ?! 0..* Extension Extensions that cannot be ignored
... status ?!SΣ 1..1 code draft | issued | balanced | cancelled | entered-in-error
Binding: InvoiceStatus (required): Codes identifying the lifecycle stage of an Invoice.
... subject SΣ 0..1 Reference(NG Patient) The patient this invoice is about
... date SΣ 0..1 dateTime Invoice date / posting date
... participant S 0..* BackboneElement Participant in creation of this Invoice
.... modifierExtension ?!Σ 0..* Extension Extensions that cannot be ignored even if unrecognized
.... role 0..1 CodeableConcept Role (e.g., performer, payee)
.... actor 1..1 Reference(NG Practitioner | NG Organization) Individual who was involved
... issuer S 0..1 Reference(NG Organization) Organization issuing the invoice (e.g., pharmacy)
... lineItem S 0..* BackboneElement Line items of this Invoice
.... modifierExtension ?!Σ 0..* Extension Extensions that cannot be ignored even if unrecognized
.... sequence 0..1 positiveInt Line order
.... chargeItem[x] 1..1 What is being billed (code or reference)
..... chargeItemReference Reference(ChargeItem)
..... chargeItemCodeableConcept CodeableConcept
... totalPriceComponent 0..* See priceComponent (Invoice) Invoice-level price components (e.g., subtotal, VAT)
... totalNet Σ 0..1 Money Total after adjustments
... totalGross Σ 0..1 Money Total before adjustments
... paymentTerms 0..1 markdown Payment instructions/terms

doco Documentation for this format

Terminology Bindings

Path Status Usage ValueSet Version Source
Invoice.status Base required InvoiceStatus 📍4.0.1 FHIR Std.

Constraints

Id Grade Path(s) Description Expression
dom-2 error Invoice If the resource is contained in another resource, it SHALL NOT contain nested Resources contained.contained.empty()
dom-3 error Invoice 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 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(canonical) = '#').exists()).not()).trace('unmatched', id).empty()
dom-4 error Invoice 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 error Invoice If a resource is contained in another resource, it SHALL NOT have a security label contained.meta.security.empty()
dom-6 best practice Invoice A resource should have narrative for robust management text.`div`.exists()
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()

Differential View

This structure is derived from Invoice

NameFlagsCard.TypeDescription & Constraints    Filter: Filtersdoco
.. Invoice 0..* Invoice Invoice containing ChargeItems from an Account
... status S 1..1 code draft | issued | balanced | cancelled | entered-in-error
... type S 0..1 CodeableConcept Invoice category (e.g., Rx invoice)
... subject S 0..1 Reference(NG Patient) The patient this invoice is about
... participant S 0..* BackboneElement Participant in creation of this Invoice
.... role 0..1 CodeableConcept Role (e.g., performer, payee)
.... actor 1..1 Reference(NG Practitioner | NG Organization) Individual who was involved
... issuer S 0..1 Reference(NG Organization) Organization issuing the invoice (e.g., pharmacy)
... lineItem S 0..* BackboneElement Line items of this Invoice
.... sequence 0..1 positiveInt Line order
.... chargeItem[x] 1..1 Reference(ChargeItem), CodeableConcept What is being billed (code or reference)
... totalPriceComponent 0..* Invoice-level price components (e.g., subtotal, VAT)
... totalNet 0..1 Money Total after adjustments
... totalGross 0..1 Money Total before adjustments
... paymentTerms 0..1 markdown Payment instructions/terms
... note
.... text 1..1 markdown Free text note (e.g., co-pay, coverage info)

doco Documentation for this format

Snapshot View

NameFlagsCard.TypeDescription & Constraints    Filter: Filtersdoco
.. Invoice 0..* Invoice Invoice containing ChargeItems from an Account
... id Σ 0..1 id Logical id of this artifact
... meta Σ 0..1 Meta Metadata about the resource
... implicitRules ?!Σ 0..1 uri A set of rules under which this content was created
... text 0..1 Narrative Text summary of the resource, for human interpretation
This profile does not constrain the narrative in regard to content, language, or traceability to data elements
... contained 0..* Resource Contained, inline Resources
... extension 0..* Extension Additional content defined by implementations
... modifierExtension ?! 0..* Extension Extensions that cannot be ignored
... identifier Σ 0..* Identifier Business Identifier for item
... status ?!SΣ 1..1 code draft | issued | balanced | cancelled | entered-in-error
Binding: InvoiceStatus (required): Codes identifying the lifecycle stage of an Invoice.
... cancelledReason 0..1 string Reason for cancellation of this Invoice
... type SΣ 0..1 CodeableConcept Invoice category (e.g., Rx invoice)
... subject SΣ 0..1 Reference(NG Patient) The patient this invoice is about
... recipient Σ 0..1 Reference(Organization | Patient | RelatedPerson) Recipient of this invoice
... date SΣ 0..1 dateTime Invoice date / posting date
... participant S 0..* BackboneElement Participant in creation of this Invoice
.... id 0..1 string Unique id for inter-element referencing
.... extension 0..* Extension Additional content defined by implementations
.... modifierExtension ?!Σ 0..* Extension Extensions that cannot be ignored even if unrecognized
.... role 0..1 CodeableConcept Role (e.g., performer, payee)
.... actor 1..1 Reference(NG Practitioner | NG Organization) Individual who was involved
... issuer S 0..1 Reference(NG Organization) Organization issuing the invoice (e.g., pharmacy)
... account 0..1 Reference(Account) Account that is being balanced
... lineItem S 0..* BackboneElement Line items of this Invoice
.... id 0..1 string Unique id for inter-element referencing
.... extension 0..* Extension Additional content defined by implementations
.... modifierExtension ?!Σ 0..* Extension Extensions that cannot be ignored even if unrecognized
.... sequence 0..1 positiveInt Line order
.... chargeItem[x] 1..1 What is being billed (code or reference)
..... chargeItemReference Reference(ChargeItem)
..... chargeItemCodeableConcept CodeableConcept
.... priceComponent 0..* BackboneElement Components of total line item price
..... id 0..1 string Unique id for inter-element referencing
..... extension 0..* Extension Additional content defined by implementations
..... modifierExtension ?!Σ 0..* Extension Extensions that cannot be ignored even if unrecognized
..... type 1..1 code base | surcharge | deduction | discount | tax | informational
Binding: InvoicePriceComponentType (required): Codes indicating the kind of the price component.
..... code 0..1 CodeableConcept Code identifying the specific component
..... factor 0..1 decimal Factor used for calculating this component
..... amount 0..1 Money Monetary amount associated with this component
... totalPriceComponent 0..* See priceComponent (Invoice) Invoice-level price components (e.g., subtotal, VAT)
... totalNet Σ 0..1 Money Total after adjustments
... totalGross Σ 0..1 Money Total before adjustments
... paymentTerms 0..1 markdown Payment instructions/terms
... note 0..* Annotation Comments made about the invoice
.... id 0..1 string Unique id for inter-element referencing
.... extension 0..* Extension Additional content defined by implementations
Slice: Unordered, Open by value:url
.... author[x] Σ 0..1 Individual responsible for the annotation
..... authorReference Reference(Practitioner | Patient | RelatedPerson | Organization)
..... authorString string
.... time Σ 0..1 dateTime When the annotation was made
.... text Σ 1..1 markdown Free text note (e.g., co-pay, coverage info)

doco Documentation for this format

Terminology Bindings

Path Status Usage ValueSet Version Source
Invoice.language Base preferred Common Languages 📍4.0.1 FHIR Std.
Invoice.status Base required InvoiceStatus 📍4.0.1 FHIR Std.
Invoice.lineItem.priceComponent.​type Base required InvoicePriceComponentType 📍4.0.1 FHIR Std.

Constraints

Id Grade Path(s) Description Expression
dom-2 error Invoice If the resource is contained in another resource, it SHALL NOT contain nested Resources contained.contained.empty()
dom-3 error Invoice 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 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(canonical) = '#').exists()).not()).trace('unmatched', id).empty()
dom-4 error Invoice 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 error Invoice If a resource is contained in another resource, it SHALL NOT have a security label contained.meta.security.empty()
dom-6 best practice Invoice A resource should have narrative for robust management text.`div`.exists()
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()

 

Other representations of profile: CSV, Excel, Schematron