HL7 Vietnam VN Core FHIR Implementation Guide

Hướng dẫn triển khai FHIR cốt lõi Việt Nam — VN Core FHIR Implementation Guide
0.10.0 - Draft for Community Review Viet Nam cờ

Hướng dẫn triển khai FHIR cốt lõi Việt Nam — VN Core FHIR Implementation Guide - Draft for Community Review (v0.10.0) built by the FHIR (HL7® FHIR® Standard) Build Tools. See the Directory of published versions

Hồ sơ tài nguyên: Bảng kê chi phí khám bệnh, chữa bệnh — VN Core Cost Statement Invoice

URL chính thức: http://fhir.hl7.org.vn/core/StructureDefinition/vn-core-cost-statement-invoice Phiên bản: 0.10.0
Computable Name: VNCoreCostStatementInvoice
Định danh khác: OID:2.25.161089673617632664299011809196868855799.42.51

Bản quyền/Pháp lý: Bộ Y tế Việt Nam — QĐ 697/QĐ-BYT (19/03/2026); chuẩn dữ liệu đầu ra theo QĐ 3176/QĐ-BYT (29/10/2024).

Bảng kê chi phí khám bệnh, chữa bệnh theo mẫu QĐ 697/QĐ-BYT: chứng từ do cơ sở khám bệnh, chữa bệnh lập cho một lượt khám chữa bệnh của một người bệnh, lưu cùng hồ sơ bệnh án và cung cấp cho người bệnh.

Vì sao là Invoice chứ không phải Claim. Bảng kê là chứng từ giữa cơ sở và người bệnh, không phải hồ sơ đề nghị thanh toán gửi cơ quan bảo hiểm; số tiền trên đó là số cơ sở tự tính, chưa qua giám định. Quyết định:

  • issuer = cơ sở KCB, recipient = người bệnh — đúng cặp actor của văn bản.
  • Không bắt buộc liên kết bảo hiểm, nên bảng kê của người không có thẻ BHYT (QĐ 697/QĐ-BYT Phần Hai) biểu diễn được tự nhiên. Claim.insurance là 1..* nên không làm được điều này mà không tạo Coverage giả.

Hồ sơ đề nghị thanh toán gửi cơ quan bảo hiểm dùng VNCoreClaim: một đợt KCB là một Claim với một MA_LK. Khi đổi thẻ giữa đợt hoặc có nhiều thẻ/quyền lợi đồng thời, Claim đó mang nhiều insurance, đúng một focal. Claim.related vẫn tuỳ chọn theo ngữ nghĩa FHIR; VN Core không đặt nghĩa vụ hỗ trợ tối thiểu, không dùng nó để hướng dẫn chia đợt hoặc sinh MA_LK mới, và chưa quy định mô hình FHIR cho hồ sơ điều chỉnh/bổ sung trong 0.10.0. Bản ký của bảng kê dùng Composition hoặc DocumentReference. Chi tiết: ADR-0021, sửa đổi 14/09/2026.

Cách biểu diễn 13 cột của mẫu:

Cột mẫu Vị trí trong Invoice
Nội dung (mã dịch vụ/thuốc/vật tư) lineItem.chargeItemCodeableConcept
Nhóm chi phí, ngày thực hiện, phân đoạn thẻ lineItem.extension[line]
Số lượng, thành tiền bệnh viện (cột 7) lineItem.priceComponent[base].factor và .amount
Đơn giá BH, tỷ lệ, thành tiền BH (cột 5, 6, 8, 9) lineItem.extension[insuranceCostInfo]
Bốn nguồn thanh toán (cột 10–13) lineItem.extension[linePaymentAllocation]
Tổng cả đợt totalNet

Usages:

You can also check for usages in the FHIR IG Statistics

Các dạng xem hình thức của nội dung hồ sơ

Mô tả profile, differential, snapshot và các biểu diễn liên quan.

NameFlagsCard.TypeDescription & Constraints    Filter: Filtersdoco
.. Invoice C 0..* Invoice Invoice containing ChargeItems from an Account
Constraints: vn-cost-statement-segment-sequence-unique, vn-cost-statement-line-segment-exists, vn-cost-statement-line-unit-price-required, vn-cost-statement-money-vnd, vn-cost-statement-line-quantity-amount-required, vn-cost-statement-transport-line-category, vn-cost-statement-total-sum, vn-cost-statement-issued-allocation-complete, vn-cost-statement-package-component-category, vn-cost-statement-related-service-exists, vn-cost-statement-uninsured-line-defaults
... implicitRules ?!Σ 0..1 uri A set of rules under which this content was created
... Slices for extension 1..* Extension Extension
Slice: Unordered, Open by value:url
.... extension:segment SC 1..* (Complex) Phân đoạn thẻ và mức hưởng của đợt khám
URL: http://fhir.hl7.org.vn/core/StructureDefinition/vn-ext-cost-statement-segment
Constraints: vn-cost-statement-segment-benefit-range, vn-cost-statement-uninsured-no-benefit
... modifierExtension ?! 0..* Extension Extensions that cannot be ignored
.... identifier:MALK SΣ 1..1 Identifier Mã liên kết hồ sơ (MA_LK) — khoá nối bảng kê, bản ký và các hồ sơ đề nghị thanh toán của cùng đợt
..... use ?!Σ 0..1 code usual | official | temp | secondary | old (If known)
Binding: IdentifierUse (required): Identifies the purpose for this identifier, if known .
..... type Σ 0..1 CodeableConcept Description of identifier
Binding: Identifier Type Codes (extensible): A coded type for an identifier that can be used to determine which identifier to use for a specific purpose.
Required Pattern: At least the following
...... id 0..1 string Unique id for inter-element referencing
...... extension 0..* Extension Additional content defined by implementations
...... coding 1..* Coding Code defined by a terminology system
Fixed Value: (Complex)
....... id 0..1 string Unique id for inter-element referencing
....... extension 0..* Extension Additional content defined by implementations
....... system 1..1 uri Identity of the terminology system
Fixed Value: http://fhir.hl7.org.vn/core/CodeSystem/vn-identifier-type-cs
....... version 0..1 string Version of the system - if relevant
....... code 1..1 code Symbol in syntax defined by the system
Fixed Value: MA_LK
....... display 0..1 string Representation defined by the system
....... userSelected 0..1 boolean If this coding was chosen directly by the user
...... text 0..1 string Plain text representation of the concept
..... system Σ 1..1 uri The namespace for the identifier value
Fixed Value: http://fhir.hl7.org.vn/core/sid/ma-lk
..... value SΣ 1..1 string Giá trị MA_LK
Example General: 123456
... status ?!SΣ 1..1 code Trạng thái bảng kê: draft | issued | balanced | cancelled | entered-in-error
Binding: InvoiceStatus (required): Codes identifying the lifecycle stage of an Invoice.
... type SΣ 0..1 CodeableConcept Loại bảng kê
... subject SΣ 1..1 Reference(Bệnh nhân VN Core — VN Core Patient Profile) Người bệnh của lượt khám
... recipient SΣ 0..1 Reference(Bệnh nhân VN Core — VN Core Patient Profile | Người liên quan/người giám hộ VN Core — VN Core RelatedPerson Profile | Cơ sở y tế VN Core — VN Core Organization Profile) Bên nhận bảng kê — thường là chính người bệnh hoặc người đại diện
... date SΣ 1..1 dateTime Ngày lập bảng kê
... issuer S 1..1 Reference(Cơ sở y tế VN Core — VN Core Organization Profile) Cơ sở khám bệnh, chữa bệnh lập bảng kê
... account S 1..1 Reference(Tài khoản viện phí — VN Core Account) Tài khoản viện phí của đợt điều trị mà bảng kê này tổng hợp
... lineItem SC 1..* BackboneElement Dòng chi phí của bảng kê
Constraints: vn-cost-statement-line-allocation-sum
.... Slices for extension 1..* Extension Extension
Slice: Unordered, Open by value:url
..... extension:calculation SC 0..1 (Complex) Ngữ cảnh tính: vai trò dòng, cơ sở tính, quy tắc trần, miễn trần, bộ công thức
URL: http://fhir.hl7.org.vn/core/StructureDefinition/vn-ext-cost-calculation-context
Constraints: vn-cost-calculation-stent-ordinal, vn-cost-calculation-exemption-needs-cap, vn-cost-calculation-transport-basis-coherent
..... extension:line S 1..1 (Complex) Phân đoạn thẻ, nhóm chi phí và ngày thực hiện của dòng
URL: http://fhir.hl7.org.vn/core/StructureDefinition/vn-ext-cost-statement-line
..... extension:insuranceCostInfo SC 0..1 (Complex) Đơn giá BH, tỷ lệ thanh toán và thành tiền BH — cột 5, 6, 8, 9
URL: http://fhir.hl7.org.vn/core/StructureDefinition/vn-ext-insurance-cost-info
Constraints: vn-insurance-cost-ratio-and-lexical
..... extension:linePaymentAllocation SC 0..1 (Complex) Bốn nguồn thanh toán — cột 10 đến 13
URL: http://fhir.hl7.org.vn/core/StructureDefinition/vn-ext-line-payment-allocation
Constraints: vn-line-payment-allocation-vnd, vn-line-payment-allocation-nonnegative
.... modifierExtension ?!Σ 0..* Extension Extensions that cannot be ignored even if unrecognized
.... sequence S 1..1 positiveInt Sequence number of line item
.... chargeItem[x] S 1..1 Mã dịch vụ, thuốc hoặc vật tư của dòng; dùng Reference(ChargeItem) khi hệ thống đã có ChargeItem
..... chargeItemReference Reference(ChargeItem)
..... chargeItemCodeableConcept CodeableConcept
.... Slices for priceComponent S 1..* BackboneElement Thành phần giá của dòng; lát `base` mang số lượng và thành tiền bệnh viện
Slice: Unordered, Open by value:type
..... priceComponent:All Slices Content/Rules for all slices
...... modifierExtension ?!Σ 0..* Extension Extensions that cannot be ignored even if unrecognized
...... type S 1..1 code base | surcharge | deduction | discount | tax | informational
Binding: InvoicePriceComponentType (required): Codes indicating the kind of the price component.
...... amount 0..1 Money Thành tiền của thành phần, VND
....... currency Σ 1..1 code ISO 4217 Currency Code
Binding: Currencies (required): A code indicating the currency, taken from ISO 4217.
Fixed Value: VND
..... priceComponent:base S 1..1 BackboneElement Components of total line item price
...... modifierExtension ?!Σ 0..* Extension Extensions that cannot be ignored even if unrecognized
...... type S 1..1 code base | surcharge | deduction | discount | tax | informational
Binding: InvoicePriceComponentType (required): Codes indicating the kind of the price component.
Fixed Value: base
...... factor S 0..1 decimal Số lượng của dòng — cột (3) của mẫu; trống ở nhánh người bệnh tự túc phương tiện
...... amount S 0..1 Money Thành tiền bệnh viện — cột (7) của mẫu; trống ở nhánh người bệnh tự túc phương tiện
....... value SΣ 1..1 decimal Numerical value (with implicit precision)
....... currency Σ 1..1 code ISO 4217 Currency Code
Binding: Currencies (required): A code indicating the currency, taken from ISO 4217.
Fixed Value: VND
... totalNet SΣ 1..1 Money Tổng thành tiền bệnh viện của cả đợt khám
.... currency Σ 1..1 code ISO 4217 Currency Code
Binding: Currencies (required): A code indicating the currency, taken from ISO 4217.
Fixed Value: VND
... totalGross SΣ 0..1 Money Tổng sau các khoản cộng thêm, nếu có

doco Documentation for this format

Terminology Bindings

Path Status Usage ValueSet Version Source
Invoice.identifier:MALK.​use Base required IdentifierUse 📍4.0.1 FHIR Std.
Invoice.identifier:MALK.​type Base extensible IdentifierType 📍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.
Invoice.lineItem.priceComponent.​amount.currency Base required CurrencyCode 📍4.0.1 FHIR Std.
Invoice.lineItem.priceComponent:base.​type Base required InvoicePriceComponentType 📍4.0.1 FHIR Std.
Invoice.lineItem.priceComponent:base.​amount.currency Base required CurrencyCode 📍4.0.1 FHIR Std.
Invoice.totalNet.currency Base required CurrencyCode 📍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()
vn-cost-calculation-exemption-needs-cap error Invoice.lineItem.extension:calculation Chỉ khai miễn trần khi dòng đang áp một quy tắc trần. A cap exemption SHALL NOT be declared on a line with no cap rule. extension.where(url = 'exemption').empty() or extension.where(url = 'capRule').value.ofType(CodeableConcept).coding.where(system = 'http://fhir.hl7.org.vn/core/CodeSystem/vn-cost-calculation-axis-cs' and code = 'no-cap').empty()
vn-cost-calculation-stent-ordinal error Invoice.lineItem.extension:calculation Dòng stent bổ sung phải khai thứ tự trong khoảng 2-4. An additional-stent line SHALL declare an ordinal between 2 and 4. extension.where(url = 'lineRole').value.ofType(CodeableConcept).coding.where(system = 'http://fhir.hl7.org.vn/core/CodeSystem/vn-cost-calculation-axis-cs' and code = 'additional-stent').empty() or extension.where(url = 'ordinal').value.ofType(positiveInt).where($this >= 2 and $this <= 4).exists()
vn-cost-calculation-transport-basis-coherent error Invoice.lineItem.extension:calculation Cơ sở tính vận chuyển và vai trò dòng vận chuyển phải đi cùng nhau. A transport calculation basis and the patient-transport line role SHALL be used together. extension.where(url = 'calculationBasis').value.ofType(CodeableConcept).coding.where(system = 'http://fhir.hl7.org.vn/core/CodeSystem/vn-cost-calculation-axis-cs' and (code = 'transport-kilometre' or code = 'transport-fuel' or code = 'transport-actual-one-way')).exists() = extension.where(url = 'lineRole').value.ofType(CodeableConcept).coding.where(system = 'http://fhir.hl7.org.vn/core/CodeSystem/vn-cost-calculation-axis-cs' and code = 'patient-transport').exists()
vn-cost-statement-issued-allocation-complete error Invoice Bảng kê đã phát hành hoặc đã cân đối thì mọi dòng phải có phân bổ bốn nguồn thanh toán (cột 10–13). An issued or balanced statement SHALL allocate every line across the four payment sources. status.where($this = 'issued' or $this = 'balanced').empty() or lineItem.all(extension.where(url = 'http://fhir.hl7.org.vn/core/StructureDefinition/vn-ext-line-payment-allocation').exists())
vn-cost-statement-line-allocation-sum error Invoice.lineItem Thành tiền của dòng phải bằng tổng bốn nguồn thanh toán: quỹ BHYT, người bệnh cùng trả, nguồn khác và người bệnh tự trả. Dòng người bệnh tự túc phương tiện vận chuyển đối chiếu với cột (9) vì không có cột (7). The line amount SHALL equal the sum of the four payment sources; a patient-arranged transport line is checked against column 9 because it has no column 7. extension.where(url = 'http://fhir.hl7.org.vn/core/StructureDefinition/vn-ext-line-payment-allocation').exists() implies (extension.where(url = 'http://fhir.hl7.org.vn/core/StructureDefinition/vn-ext-cost-calculation-context').extension.where(url = 'calculationBasis').value.ofType(CodeableConcept).coding.where(system = 'http://fhir.hl7.org.vn/core/CodeSystem/vn-cost-calculation-axis-cs' and code = 'transport-actual-one-way').exists().not() implies priceComponent.where(type = 'base').amount.value = extension.where(url = 'http://fhir.hl7.org.vn/core/StructureDefinition/vn-ext-line-payment-allocation').extension.value.ofType(Money).value.aggregate($total + $this, 0)) and (extension.where(url = 'http://fhir.hl7.org.vn/core/StructureDefinition/vn-ext-cost-calculation-context').extension.where(url = 'calculationBasis').value.ofType(CodeableConcept).coding.where(system = 'http://fhir.hl7.org.vn/core/CodeSystem/vn-cost-calculation-axis-cs' and code = 'transport-actual-one-way').exists() implies extension.where(url = 'http://fhir.hl7.org.vn/core/StructureDefinition/vn-ext-insurance-cost-info').extension.where(url = 'insuranceLineAmount').value.ofType(Money).value = extension.where(url = 'http://fhir.hl7.org.vn/core/StructureDefinition/vn-ext-line-payment-allocation').extension.value.ofType(Money).value.aggregate($total + $this, 0))
vn-cost-statement-line-quantity-amount-required error Invoice Dòng chi phí phải có số lượng và thành tiền bệnh viện, trừ nhánh người bệnh tự túc phương tiện vận chuyển. A cost line SHALL carry quantity and hospital amount unless it is a patient-arranged transport line. lineItem.all(extension.where(url = 'http://fhir.hl7.org.vn/core/StructureDefinition/vn-ext-cost-calculation-context').extension.where(url = 'calculationBasis').value.ofType(CodeableConcept).coding.where(system = 'http://fhir.hl7.org.vn/core/CodeSystem/vn-cost-calculation-axis-cs' and code = 'transport-actual-one-way').exists() or (priceComponent.where(type = 'base').factor.exists() and priceComponent.where(type = 'base').amount.value.exists()))
vn-cost-statement-line-segment-exists error Invoice Mỗi dòng chi phí phải trỏ về một phân đoạn có thật trên bảng kê. Every line SHALL reference an existing segment sequence. lineItem.extension.where(url = 'http://fhir.hl7.org.vn/core/StructureDefinition/vn-ext-cost-statement-line').extension.where(url = 'segmentSequence').value.ofType(positiveInt).all($this in %resource.extension.where(url = 'http://fhir.hl7.org.vn/core/StructureDefinition/vn-ext-cost-statement-segment').extension.where(url = 'sequence').value.ofType(positiveInt))
vn-cost-statement-line-unit-price-required error Invoice Dòng chi phí không trỏ ChargeItem phải tự khai đơn vị tính và đơn giá bệnh viện — cột (2) và (4) của mẫu QĐ 697/QĐ-BYT. A line without a ChargeItem reference SHALL carry unit and hospitalUnitPrice. lineItem.where(chargeItem.ofType(Reference).exists().not()).all(extension.where(url = 'http://fhir.hl7.org.vn/core/StructureDefinition/vn-ext-cost-statement-line').extension.where(url = 'unit').exists() and extension.where(url = 'http://fhir.hl7.org.vn/core/StructureDefinition/vn-ext-cost-statement-line').extension.where(url = 'hospitalUnitPrice').exists())
vn-cost-statement-money-vnd error Invoice Mọi giá trị tiền của bảng kê phải dùng VND. Every monetary value SHALL use VND. descendants().ofType(Money).all(currency = 'VND')
vn-cost-statement-package-component-category error Invoice Thiết bị thành phần chỉ khai trên dòng thuộc nhóm chi phí gói thiết bị y tế (mã 10). Package components SHALL only appear on lines in the medical-device package category. lineItem.all(extension.where(url = 'http://fhir.hl7.org.vn/core/StructureDefinition/vn-ext-cost-statement-line').all(extension.where(url = 'packageComponent').exists() implies extension.where(url = 'category').value.ofType(CodeableConcept).coding.where(system = 'http://fhir.hl7.org.vn/core/CodeSystem/vn-cost-category-cs' and code = '10').exists()))
vn-cost-statement-related-service-exists error Invoice Dòng gói thiết bị trỏ tới dịch vụ kỹ thuật nào thì dòng đó phải có thật trên bảng kê. A referenced technical-service line SHALL exist on the same statement. lineItem.extension.where(url = 'http://fhir.hl7.org.vn/core/StructureDefinition/vn-ext-cost-statement-line').extension.where(url = 'relatedServiceSequence').value.ofType(positiveInt).all($this in %resource.lineItem.sequence)
vn-cost-statement-segment-benefit-range error Invoice.extension:segment Mức hưởng của phân đoạn phải nằm trong khoảng 0–100. The segment benefit level SHALL be between 0 and 100. extension.where(url = 'benefitLevel').value.ofType(decimal).all($this >= 0 and $this <= 100)
vn-cost-statement-segment-sequence-unique error Invoice Mỗi sequence phân đoạn phải duy nhất trong bảng kê. Every segment sequence SHALL be unique within the cost statement. extension.where(url = 'http://fhir.hl7.org.vn/core/StructureDefinition/vn-ext-cost-statement-segment').extension.where(url = 'sequence').value.ofType(positiveInt).isDistinct()
vn-cost-statement-total-sum error Invoice Tổng bảng kê phải bằng tổng thành tiền của mọi dòng. The statement total SHALL equal the sum of all line amounts. totalNet.value.exists() implies totalNet.value = lineItem.priceComponent.where(type = 'base').amount.value.aggregate($total + $this, 0)
vn-cost-statement-transport-line-category error Invoice Dòng khai vai trò vận chuyển người bệnh phải thuộc nhóm chi phí vận chuyển (mã 11), và ngược lại. A patient-transport line role and the transport cost category SHALL agree. lineItem.all(extension.where(url = 'http://fhir.hl7.org.vn/core/StructureDefinition/vn-ext-cost-calculation-context').extension.where(url = 'lineRole').value.ofType(CodeableConcept).coding.where(system = 'http://fhir.hl7.org.vn/core/CodeSystem/vn-cost-calculation-axis-cs' and code = 'patient-transport').exists() = extension.where(url = 'http://fhir.hl7.org.vn/core/StructureDefinition/vn-ext-cost-statement-line').extension.where(url = 'category').value.ofType(CodeableConcept).coding.where(system = 'http://fhir.hl7.org.vn/core/CodeSystem/vn-cost-category-cs' and code = '11').exists())
vn-cost-statement-uninsured-line-defaults error Invoice Cột số (8) của dòng không có thẻ BHYT phải bằng 0 và cột số (13) phải bằng cột số (7). For every line owned by a segment without Coverage, column 8 SHALL be explicitly 0 and column 13 SHALL equal column 7. %resource.lineItem.where(extension.where(url = 'http://fhir.hl7.org.vn/core/StructureDefinition/vn-ext-cost-statement-line').extension.where(url = 'segmentSequence').value.ofType(positiveInt).intersect(%resource.extension.where(url = 'http://fhir.hl7.org.vn/core/StructureDefinition/vn-ext-cost-statement-segment').where(extension.where(url = 'coverage').empty()).extension.where(url = 'sequence').value.ofType(positiveInt)).exists()).all(extension.where(url = 'http://fhir.hl7.org.vn/core/StructureDefinition/vn-ext-insurance-cost-info').extension.where(url = 'paymentRatio').value.ofType(decimal) = 0 and extension.where(url = 'http://fhir.hl7.org.vn/core/StructureDefinition/vn-ext-line-payment-allocation').extension.where(url = 'patientSelfPay').value.ofType(Money).value = priceComponent.where(type = 'base').amount.value)
vn-cost-statement-uninsured-no-benefit error Invoice.extension:segment Phân đoạn không có thẻ BHYT thì không được khai mức hưởng. A segment without a Coverage SHALL NOT declare a benefit level. extension.where(url = 'coverage').empty() implies extension.where(url = 'benefitLevel').empty()
vn-insurance-cost-ratio-and-lexical error Invoice.lineItem.extension:insuranceCostInfo Các tỷ lệ phải nằm trong khoảng 0-100; chuỗi lexical gốc nếu có phải đi kèm paymentRatio; khoảng hiệu lực trần nếu có phải đi kèm paymentCeiling. Percentage values SHALL be within 0-100; a source lexical string SHALL accompany paymentRatio; a ceiling period SHALL accompany paymentCeiling. extension.where(url = 'paymentRatio').value.ofType(decimal).all($this >= 0 and $this <= 100) and extension.where(url = 'servicePaymentRatio').value.ofType(decimal).all($this >= 0 and $this <= 100) and extension.where(url = 'benefitLevel').value.ofType(decimal).all($this >= 0 and $this <= 100) and (extension.where(url = 'paymentRatioSourceLexical').empty() or extension.where(url = 'paymentRatio').exists()) and (extension.where(url = 'paymentCeilingPeriod').empty() or extension.where(url = 'paymentCeiling').exists())
vn-line-payment-allocation-nonnegative error Invoice.lineItem.extension:linePaymentAllocation Mọi khoản tiền phân bổ phải lớn hơn hoặc bằng 0. Every allocated Money value SHALL be greater than or equal to zero. extension.value.ofType(Money).all(value >= 0)
vn-line-payment-allocation-vnd error Invoice.lineItem.extension:linePaymentAllocation Mọi khoản tiền phân bổ phải dùng VND. Every allocated Money value SHALL use VND. extension.value.ofType(Money).all(currency = 'VND')

NameFlagsCard.TypeDescription & Constraints    Filter: Filtersdoco
.. Invoice C 0..* Invoice Invoice containing ChargeItems from an Account
Constraints: vn-cost-statement-segment-sequence-unique, vn-cost-statement-line-segment-exists, vn-cost-statement-line-unit-price-required, vn-cost-statement-money-vnd, vn-cost-statement-line-quantity-amount-required, vn-cost-statement-transport-line-category, vn-cost-statement-total-sum, vn-cost-statement-issued-allocation-complete, vn-cost-statement-package-component-category, vn-cost-statement-related-service-exists, vn-cost-statement-uninsured-line-defaults
... Slices for extension 1..* Extension Extension
Slice: Unordered, Open by value:url
.... extension:segment SC 1..* (Complex) Phân đoạn thẻ và mức hưởng của đợt khám
URL: http://fhir.hl7.org.vn/core/StructureDefinition/vn-ext-cost-statement-segment
Constraints: vn-cost-statement-uninsured-no-benefit
... Slices for identifier S 1..* Identifier Mã lượt khám chữa bệnh (MA_LK) và số bảng kê
Slice: Unordered, Open by value:system
.... identifier:MALK S 1..1 Identifier Mã liên kết hồ sơ (MA_LK) — khoá nối bảng kê, bản ký và các hồ sơ đề nghị thanh toán của cùng đợt
..... type 0..1 CodeableConcept Description of identifier
Required Pattern: At least the following
...... coding 1..* Coding Code defined by a terminology system
Fixed Value: (Complex)
....... system 1..1 uri Identity of the terminology system
Fixed Value: http://fhir.hl7.org.vn/core/CodeSystem/vn-identifier-type-cs
....... code 1..1 code Symbol in syntax defined by the system
Fixed Value: MA_LK
..... system 1..1 uri The namespace for the identifier value
Fixed Value: http://fhir.hl7.org.vn/core/sid/ma-lk
..... value S 1..1 string Giá trị MA_LK
... status S 1..1 code Trạng thái bảng kê: draft | issued | balanced | cancelled | entered-in-error
... subject S 1..1 Reference(Bệnh nhân VN Core — VN Core Patient Profile) Người bệnh của lượt khám
... recipient S 0..1 Reference(Bệnh nhân VN Core — VN Core Patient Profile | Người liên quan/người giám hộ VN Core — VN Core RelatedPerson Profile | Cơ sở y tế VN Core — VN Core Organization Profile) Bên nhận bảng kê — thường là chính người bệnh hoặc người đại diện
... date S 1..1 dateTime Ngày lập bảng kê
... issuer S 1..1 Reference(Cơ sở y tế VN Core — VN Core Organization Profile) Cơ sở khám bệnh, chữa bệnh lập bảng kê
... account S 1..1 Reference(Tài khoản viện phí — VN Core Account) Tài khoản viện phí của đợt điều trị mà bảng kê này tổng hợp
... lineItem SC 1..* BackboneElement Dòng chi phí của bảng kê
Constraints: vn-cost-statement-line-allocation-sum
.... Slices for extension 1..* Extension Extension
Slice: Unordered, Open by value:url
..... extension:calculation S 0..1 (Complex) Ngữ cảnh tính: vai trò dòng, cơ sở tính, quy tắc trần, miễn trần, bộ công thức
URL: http://fhir.hl7.org.vn/core/StructureDefinition/vn-ext-cost-calculation-context
..... extension:line S 1..1 (Complex) Phân đoạn thẻ, nhóm chi phí và ngày thực hiện của dòng
URL: http://fhir.hl7.org.vn/core/StructureDefinition/vn-ext-cost-statement-line
..... extension:insuranceCostInfo S 0..1 (Complex) Đơn giá BH, tỷ lệ thanh toán và thành tiền BH — cột 5, 6, 8, 9
URL: http://fhir.hl7.org.vn/core/StructureDefinition/vn-ext-insurance-cost-info
..... extension:linePaymentAllocation S 0..1 (Complex) Bốn nguồn thanh toán — cột 10 đến 13
URL: http://fhir.hl7.org.vn/core/StructureDefinition/vn-ext-line-payment-allocation
.... sequence S 1..1 positiveInt Sequence number of line item
.... chargeItem[x] S 1..1 Reference(ChargeItem), CodeableConcept Mã dịch vụ, thuốc hoặc vật tư của dòng; dùng Reference(ChargeItem) khi hệ thống đã có ChargeItem
.... Slices for priceComponent S 1..* BackboneElement Thành phần giá của dòng; lát `base` mang số lượng và thành tiền bệnh viện
Slice: Unordered, Open by value:type
..... priceComponent:All Slices Content/Rules for all slices
...... type S 1..1 code base | surcharge | deduction | discount | tax | informational
...... amount 0..1 Money Thành tiền của thành phần, VND
....... currency 1..1 code ISO 4217 Currency Code
Fixed Value: VND
..... priceComponent:base S 1..1 BackboneElement Components of total line item price
...... type S 1..1 code base | surcharge | deduction | discount | tax | informational
Fixed Value: base
...... factor S 0..1 decimal Số lượng của dòng — cột (3) của mẫu; trống ở nhánh người bệnh tự túc phương tiện
...... amount S 0..1 Money Thành tiền bệnh viện — cột (7) của mẫu; trống ở nhánh người bệnh tự túc phương tiện
....... value S 1..1 decimal Numerical value (with implicit precision)
....... currency 1..1 code ISO 4217 Currency Code
Fixed Value: VND
... totalNet S 1..1 Money Tổng thành tiền bệnh viện của cả đợt khám
.... currency 1..1 code ISO 4217 Currency Code
Fixed Value: VND
... totalGross S 0..1 Money Tổng sau các khoản cộng thêm, nếu có

doco Documentation for this format

Constraints

Id Grade Path(s) Description Expression
vn-cost-statement-issued-allocation-complete error Invoice Bảng kê đã phát hành hoặc đã cân đối thì mọi dòng phải có phân bổ bốn nguồn thanh toán (cột 10–13). An issued or balanced statement SHALL allocate every line across the four payment sources. status.where($this = 'issued' or $this = 'balanced').empty() or lineItem.all(extension.where(url = 'http://fhir.hl7.org.vn/core/StructureDefinition/vn-ext-line-payment-allocation').exists())
vn-cost-statement-line-allocation-sum error Invoice.lineItem Thành tiền của dòng phải bằng tổng bốn nguồn thanh toán: quỹ BHYT, người bệnh cùng trả, nguồn khác và người bệnh tự trả. Dòng người bệnh tự túc phương tiện vận chuyển đối chiếu với cột (9) vì không có cột (7). The line amount SHALL equal the sum of the four payment sources; a patient-arranged transport line is checked against column 9 because it has no column 7. extension.where(url = 'http://fhir.hl7.org.vn/core/StructureDefinition/vn-ext-line-payment-allocation').exists() implies (extension.where(url = 'http://fhir.hl7.org.vn/core/StructureDefinition/vn-ext-cost-calculation-context').extension.where(url = 'calculationBasis').value.ofType(CodeableConcept).coding.where(system = 'http://fhir.hl7.org.vn/core/CodeSystem/vn-cost-calculation-axis-cs' and code = 'transport-actual-one-way').exists().not() implies priceComponent.where(type = 'base').amount.value = extension.where(url = 'http://fhir.hl7.org.vn/core/StructureDefinition/vn-ext-line-payment-allocation').extension.value.ofType(Money).value.aggregate($total + $this, 0)) and (extension.where(url = 'http://fhir.hl7.org.vn/core/StructureDefinition/vn-ext-cost-calculation-context').extension.where(url = 'calculationBasis').value.ofType(CodeableConcept).coding.where(system = 'http://fhir.hl7.org.vn/core/CodeSystem/vn-cost-calculation-axis-cs' and code = 'transport-actual-one-way').exists() implies extension.where(url = 'http://fhir.hl7.org.vn/core/StructureDefinition/vn-ext-insurance-cost-info').extension.where(url = 'insuranceLineAmount').value.ofType(Money).value = extension.where(url = 'http://fhir.hl7.org.vn/core/StructureDefinition/vn-ext-line-payment-allocation').extension.value.ofType(Money).value.aggregate($total + $this, 0))
vn-cost-statement-line-quantity-amount-required error Invoice Dòng chi phí phải có số lượng và thành tiền bệnh viện, trừ nhánh người bệnh tự túc phương tiện vận chuyển. A cost line SHALL carry quantity and hospital amount unless it is a patient-arranged transport line. lineItem.all(extension.where(url = 'http://fhir.hl7.org.vn/core/StructureDefinition/vn-ext-cost-calculation-context').extension.where(url = 'calculationBasis').value.ofType(CodeableConcept).coding.where(system = 'http://fhir.hl7.org.vn/core/CodeSystem/vn-cost-calculation-axis-cs' and code = 'transport-actual-one-way').exists() or (priceComponent.where(type = 'base').factor.exists() and priceComponent.where(type = 'base').amount.value.exists()))
vn-cost-statement-line-segment-exists error Invoice Mỗi dòng chi phí phải trỏ về một phân đoạn có thật trên bảng kê. Every line SHALL reference an existing segment sequence. lineItem.extension.where(url = 'http://fhir.hl7.org.vn/core/StructureDefinition/vn-ext-cost-statement-line').extension.where(url = 'segmentSequence').value.ofType(positiveInt).all($this in %resource.extension.where(url = 'http://fhir.hl7.org.vn/core/StructureDefinition/vn-ext-cost-statement-segment').extension.where(url = 'sequence').value.ofType(positiveInt))
vn-cost-statement-line-unit-price-required error Invoice Dòng chi phí không trỏ ChargeItem phải tự khai đơn vị tính và đơn giá bệnh viện — cột (2) và (4) của mẫu QĐ 697/QĐ-BYT. A line without a ChargeItem reference SHALL carry unit and hospitalUnitPrice. lineItem.where(chargeItem.ofType(Reference).exists().not()).all(extension.where(url = 'http://fhir.hl7.org.vn/core/StructureDefinition/vn-ext-cost-statement-line').extension.where(url = 'unit').exists() and extension.where(url = 'http://fhir.hl7.org.vn/core/StructureDefinition/vn-ext-cost-statement-line').extension.where(url = 'hospitalUnitPrice').exists())
vn-cost-statement-money-vnd error Invoice Mọi giá trị tiền của bảng kê phải dùng VND. Every monetary value SHALL use VND. descendants().ofType(Money).all(currency = 'VND')
vn-cost-statement-package-component-category error Invoice Thiết bị thành phần chỉ khai trên dòng thuộc nhóm chi phí gói thiết bị y tế (mã 10). Package components SHALL only appear on lines in the medical-device package category. lineItem.all(extension.where(url = 'http://fhir.hl7.org.vn/core/StructureDefinition/vn-ext-cost-statement-line').all(extension.where(url = 'packageComponent').exists() implies extension.where(url = 'category').value.ofType(CodeableConcept).coding.where(system = 'http://fhir.hl7.org.vn/core/CodeSystem/vn-cost-category-cs' and code = '10').exists()))
vn-cost-statement-related-service-exists error Invoice Dòng gói thiết bị trỏ tới dịch vụ kỹ thuật nào thì dòng đó phải có thật trên bảng kê. A referenced technical-service line SHALL exist on the same statement. lineItem.extension.where(url = 'http://fhir.hl7.org.vn/core/StructureDefinition/vn-ext-cost-statement-line').extension.where(url = 'relatedServiceSequence').value.ofType(positiveInt).all($this in %resource.lineItem.sequence)
vn-cost-statement-segment-sequence-unique error Invoice Mỗi sequence phân đoạn phải duy nhất trong bảng kê. Every segment sequence SHALL be unique within the cost statement. extension.where(url = 'http://fhir.hl7.org.vn/core/StructureDefinition/vn-ext-cost-statement-segment').extension.where(url = 'sequence').value.ofType(positiveInt).isDistinct()
vn-cost-statement-total-sum error Invoice Tổng bảng kê phải bằng tổng thành tiền của mọi dòng. The statement total SHALL equal the sum of all line amounts. totalNet.value.exists() implies totalNet.value = lineItem.priceComponent.where(type = 'base').amount.value.aggregate($total + $this, 0)
vn-cost-statement-transport-line-category error Invoice Dòng khai vai trò vận chuyển người bệnh phải thuộc nhóm chi phí vận chuyển (mã 11), và ngược lại. A patient-transport line role and the transport cost category SHALL agree. lineItem.all(extension.where(url = 'http://fhir.hl7.org.vn/core/StructureDefinition/vn-ext-cost-calculation-context').extension.where(url = 'lineRole').value.ofType(CodeableConcept).coding.where(system = 'http://fhir.hl7.org.vn/core/CodeSystem/vn-cost-calculation-axis-cs' and code = 'patient-transport').exists() = extension.where(url = 'http://fhir.hl7.org.vn/core/StructureDefinition/vn-ext-cost-statement-line').extension.where(url = 'category').value.ofType(CodeableConcept).coding.where(system = 'http://fhir.hl7.org.vn/core/CodeSystem/vn-cost-category-cs' and code = '11').exists())
vn-cost-statement-uninsured-line-defaults error Invoice Cột số (8) của dòng không có thẻ BHYT phải bằng 0 và cột số (13) phải bằng cột số (7). For every line owned by a segment without Coverage, column 8 SHALL be explicitly 0 and column 13 SHALL equal column 7. %resource.lineItem.where(extension.where(url = 'http://fhir.hl7.org.vn/core/StructureDefinition/vn-ext-cost-statement-line').extension.where(url = 'segmentSequence').value.ofType(positiveInt).intersect(%resource.extension.where(url = 'http://fhir.hl7.org.vn/core/StructureDefinition/vn-ext-cost-statement-segment').where(extension.where(url = 'coverage').empty()).extension.where(url = 'sequence').value.ofType(positiveInt)).exists()).all(extension.where(url = 'http://fhir.hl7.org.vn/core/StructureDefinition/vn-ext-insurance-cost-info').extension.where(url = 'paymentRatio').value.ofType(decimal) = 0 and extension.where(url = 'http://fhir.hl7.org.vn/core/StructureDefinition/vn-ext-line-payment-allocation').extension.where(url = 'patientSelfPay').value.ofType(Money).value = priceComponent.where(type = 'base').amount.value)
vn-cost-statement-uninsured-no-benefit error Invoice.extension:segment Phân đoạn không có thẻ BHYT thì không được khai mức hưởng. A segment without a Coverage SHALL NOT declare a benefit level. extension.where(url = 'coverage').empty() implies extension.where(url = 'benefitLevel').empty()
NameFlagsCard.TypeDescription & Constraints    Filter: Filtersdoco
.. Invoice C 0..* Invoice Invoice containing ChargeItems from an Account
Constraints: vn-cost-statement-segment-sequence-unique, vn-cost-statement-line-segment-exists, vn-cost-statement-line-unit-price-required, vn-cost-statement-money-vnd, vn-cost-statement-line-quantity-amount-required, vn-cost-statement-transport-line-category, vn-cost-statement-total-sum, vn-cost-statement-issued-allocation-complete, vn-cost-statement-package-component-category, vn-cost-statement-related-service-exists, vn-cost-statement-uninsured-line-defaults
... 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
... Slices for extension 1..* Extension Extension
Slice: Unordered, Open by value:url
.... extension:segment SC 1..* (Complex) Phân đoạn thẻ và mức hưởng của đợt khám
URL: http://fhir.hl7.org.vn/core/StructureDefinition/vn-ext-cost-statement-segment
Constraints: vn-cost-statement-segment-benefit-range, vn-cost-statement-uninsured-no-benefit
... modifierExtension ?! 0..* Extension Extensions that cannot be ignored
... Slices for identifier SΣ 1..* Identifier Mã lượt khám chữa bệnh (MA_LK) và số bảng kê
Slice: Unordered, Open by value:system
.... identifier:MALK SΣ 1..1 Identifier Mã liên kết hồ sơ (MA_LK) — khoá nối bảng kê, bản ký và các hồ sơ đề nghị thanh toán của cùng đợt
..... id 0..1 string Unique id for inter-element referencing
..... extension 0..* Extension Additional content defined by implementations
Slice: Unordered, Open by value:url
..... use ?!Σ 0..1 code usual | official | temp | secondary | old (If known)
Binding: IdentifierUse (required): Identifies the purpose for this identifier, if known .
..... type Σ 0..1 CodeableConcept Description of identifier
Binding: Identifier Type Codes (extensible): A coded type for an identifier that can be used to determine which identifier to use for a specific purpose.
Required Pattern: At least the following
...... id 0..1 string Unique id for inter-element referencing
...... extension 0..* Extension Additional content defined by implementations
...... coding 1..* Coding Code defined by a terminology system
Fixed Value: (Complex)
....... id 0..1 string Unique id for inter-element referencing
....... extension 0..* Extension Additional content defined by implementations
....... system 1..1 uri Identity of the terminology system
Fixed Value: http://fhir.hl7.org.vn/core/CodeSystem/vn-identifier-type-cs
....... version 0..1 string Version of the system - if relevant
....... code 1..1 code Symbol in syntax defined by the system
Fixed Value: MA_LK
....... display 0..1 string Representation defined by the system
....... userSelected 0..1 boolean If this coding was chosen directly by the user
...... text 0..1 string Plain text representation of the concept
..... system Σ 1..1 uri The namespace for the identifier value
Fixed Value: http://fhir.hl7.org.vn/core/sid/ma-lk
..... value SΣ 1..1 string Giá trị MA_LK
Example General: 123456
..... period Σ 0..1 Period Time period when id is/was valid for use
..... assigner Σ 0..1 Reference(Organization) Organization that issued id (may be just text)
... status ?!SΣ 1..1 code Trạng thái bảng kê: 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 Loại bảng kê
... subject SΣ 1..1 Reference(Bệnh nhân VN Core — VN Core Patient Profile) Người bệnh của lượt khám
... recipient SΣ 0..1 Reference(Bệnh nhân VN Core — VN Core Patient Profile | Người liên quan/người giám hộ VN Core — VN Core RelatedPerson Profile | Cơ sở y tế VN Core — VN Core Organization Profile) Bên nhận bảng kê — thường là chính người bệnh hoặc người đại diện
... date SΣ 1..1 dateTime Ngày lập bảng kê
... participant 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 Type of involvement in creation of this Invoice
.... actor 1..1 Reference(Practitioner | Organization | Patient | PractitionerRole | Device | RelatedPerson) Individual who was involved
... issuer S 1..1 Reference(Cơ sở y tế VN Core — VN Core Organization Profile) Cơ sở khám bệnh, chữa bệnh lập bảng kê
... account S 1..1 Reference(Tài khoản viện phí — VN Core Account) Tài khoản viện phí của đợt điều trị mà bảng kê này tổng hợp
... lineItem SC 1..* BackboneElement Dòng chi phí của bảng kê
Constraints: vn-cost-statement-line-allocation-sum
.... id 0..1 string Unique id for inter-element referencing
.... Slices for extension 1..* Extension Extension
Slice: Unordered, Open by value:url
..... extension:calculation SC 0..1 (Complex) Ngữ cảnh tính: vai trò dòng, cơ sở tính, quy tắc trần, miễn trần, bộ công thức
URL: http://fhir.hl7.org.vn/core/StructureDefinition/vn-ext-cost-calculation-context
Constraints: vn-cost-calculation-stent-ordinal, vn-cost-calculation-exemption-needs-cap, vn-cost-calculation-transport-basis-coherent
..... extension:line S 1..1 (Complex) Phân đoạn thẻ, nhóm chi phí và ngày thực hiện của dòng
URL: http://fhir.hl7.org.vn/core/StructureDefinition/vn-ext-cost-statement-line
..... extension:insuranceCostInfo SC 0..1 (Complex) Đơn giá BH, tỷ lệ thanh toán và thành tiền BH — cột 5, 6, 8, 9
URL: http://fhir.hl7.org.vn/core/StructureDefinition/vn-ext-insurance-cost-info
Constraints: vn-insurance-cost-ratio-and-lexical
..... extension:linePaymentAllocation SC 0..1 (Complex) Bốn nguồn thanh toán — cột 10 đến 13
URL: http://fhir.hl7.org.vn/core/StructureDefinition/vn-ext-line-payment-allocation
Constraints: vn-line-payment-allocation-vnd, vn-line-payment-allocation-nonnegative
.... modifierExtension ?!Σ 0..* Extension Extensions that cannot be ignored even if unrecognized
.... sequence S 1..1 positiveInt Sequence number of line item
.... chargeItem[x] S 1..1 Mã dịch vụ, thuốc hoặc vật tư của dòng; dùng Reference(ChargeItem) khi hệ thống đã có ChargeItem
..... chargeItemReference Reference(ChargeItem)
..... chargeItemCodeableConcept CodeableConcept
.... Slices for priceComponent S 1..* BackboneElement Thành phần giá của dòng; lát `base` mang số lượng và thành tiền bệnh viện
Slice: Unordered, Open by value:type
..... priceComponent:All Slices Content/Rules for all slices
...... 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 S 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 Thành tiền của thành phần, VND
....... id 0..1 string Unique id for inter-element referencing
....... extension 0..* Extension Additional content defined by implementations
Slice: Unordered, Open by value:url
....... value Σ 0..1 decimal Numerical value (with implicit precision)
....... currency Σ 1..1 code ISO 4217 Currency Code
Binding: Currencies (required): A code indicating the currency, taken from ISO 4217.
Fixed Value: VND
..... priceComponent:base S 1..1 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 S 1..1 code base | surcharge | deduction | discount | tax | informational
Binding: InvoicePriceComponentType (required): Codes indicating the kind of the price component.
Fixed Value: base
...... code 0..1 CodeableConcept Code identifying the specific component
...... factor S 0..1 decimal Số lượng của dòng — cột (3) của mẫu; trống ở nhánh người bệnh tự túc phương tiện
...... amount S 0..1 Money Thành tiền bệnh viện — cột (7) của mẫu; trống ở nhánh người bệnh tự túc phương tiện
....... id 0..1 string Unique id for inter-element referencing
....... extension 0..* Extension Additional content defined by implementations
Slice: Unordered, Open by value:url
....... value SΣ 1..1 decimal Numerical value (with implicit precision)
....... currency Σ 1..1 code ISO 4217 Currency Code
Binding: Currencies (required): A code indicating the currency, taken from ISO 4217.
Fixed Value: VND
... totalPriceComponent 0..* See priceComponent (Invoice) Components of Invoice total
... totalNet SΣ 1..1 Money Tổng thành tiền bệnh viện của cả đợt khám
.... id 0..1 string Unique id for inter-element referencing
.... extension 0..* Extension Additional content defined by implementations
Slice: Unordered, Open by value:url
.... value Σ 0..1 decimal Numerical value (with implicit precision)
.... currency Σ 1..1 code ISO 4217 Currency Code
Binding: Currencies (required): A code indicating the currency, taken from ISO 4217.
Fixed Value: VND
... totalGross SΣ 0..1 Money Tổng sau các khoản cộng thêm, nếu có
... paymentTerms 0..1 markdown Payment details
... note 0..* Annotation Comments made about the invoice

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.identifier:MALK.​use Base required IdentifierUse 📍4.0.1 FHIR Std.
Invoice.identifier:MALK.​type Base extensible IdentifierType 📍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.
Invoice.lineItem.priceComponent.​amount.currency Base required CurrencyCode 📍4.0.1 FHIR Std.
Invoice.lineItem.priceComponent:base.​type Base required InvoicePriceComponentType 📍4.0.1 FHIR Std.
Invoice.lineItem.priceComponent:base.​amount.currency Base required CurrencyCode 📍4.0.1 FHIR Std.
Invoice.totalNet.currency Base required CurrencyCode 📍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()
vn-cost-calculation-exemption-needs-cap error Invoice.lineItem.extension:calculation Chỉ khai miễn trần khi dòng đang áp một quy tắc trần. A cap exemption SHALL NOT be declared on a line with no cap rule. extension.where(url = 'exemption').empty() or extension.where(url = 'capRule').value.ofType(CodeableConcept).coding.where(system = 'http://fhir.hl7.org.vn/core/CodeSystem/vn-cost-calculation-axis-cs' and code = 'no-cap').empty()
vn-cost-calculation-stent-ordinal error Invoice.lineItem.extension:calculation Dòng stent bổ sung phải khai thứ tự trong khoảng 2-4. An additional-stent line SHALL declare an ordinal between 2 and 4. extension.where(url = 'lineRole').value.ofType(CodeableConcept).coding.where(system = 'http://fhir.hl7.org.vn/core/CodeSystem/vn-cost-calculation-axis-cs' and code = 'additional-stent').empty() or extension.where(url = 'ordinal').value.ofType(positiveInt).where($this >= 2 and $this <= 4).exists()
vn-cost-calculation-transport-basis-coherent error Invoice.lineItem.extension:calculation Cơ sở tính vận chuyển và vai trò dòng vận chuyển phải đi cùng nhau. A transport calculation basis and the patient-transport line role SHALL be used together. extension.where(url = 'calculationBasis').value.ofType(CodeableConcept).coding.where(system = 'http://fhir.hl7.org.vn/core/CodeSystem/vn-cost-calculation-axis-cs' and (code = 'transport-kilometre' or code = 'transport-fuel' or code = 'transport-actual-one-way')).exists() = extension.where(url = 'lineRole').value.ofType(CodeableConcept).coding.where(system = 'http://fhir.hl7.org.vn/core/CodeSystem/vn-cost-calculation-axis-cs' and code = 'patient-transport').exists()
vn-cost-statement-issued-allocation-complete error Invoice Bảng kê đã phát hành hoặc đã cân đối thì mọi dòng phải có phân bổ bốn nguồn thanh toán (cột 10–13). An issued or balanced statement SHALL allocate every line across the four payment sources. status.where($this = 'issued' or $this = 'balanced').empty() or lineItem.all(extension.where(url = 'http://fhir.hl7.org.vn/core/StructureDefinition/vn-ext-line-payment-allocation').exists())
vn-cost-statement-line-allocation-sum error Invoice.lineItem Thành tiền của dòng phải bằng tổng bốn nguồn thanh toán: quỹ BHYT, người bệnh cùng trả, nguồn khác và người bệnh tự trả. Dòng người bệnh tự túc phương tiện vận chuyển đối chiếu với cột (9) vì không có cột (7). The line amount SHALL equal the sum of the four payment sources; a patient-arranged transport line is checked against column 9 because it has no column 7. extension.where(url = 'http://fhir.hl7.org.vn/core/StructureDefinition/vn-ext-line-payment-allocation').exists() implies (extension.where(url = 'http://fhir.hl7.org.vn/core/StructureDefinition/vn-ext-cost-calculation-context').extension.where(url = 'calculationBasis').value.ofType(CodeableConcept).coding.where(system = 'http://fhir.hl7.org.vn/core/CodeSystem/vn-cost-calculation-axis-cs' and code = 'transport-actual-one-way').exists().not() implies priceComponent.where(type = 'base').amount.value = extension.where(url = 'http://fhir.hl7.org.vn/core/StructureDefinition/vn-ext-line-payment-allocation').extension.value.ofType(Money).value.aggregate($total + $this, 0)) and (extension.where(url = 'http://fhir.hl7.org.vn/core/StructureDefinition/vn-ext-cost-calculation-context').extension.where(url = 'calculationBasis').value.ofType(CodeableConcept).coding.where(system = 'http://fhir.hl7.org.vn/core/CodeSystem/vn-cost-calculation-axis-cs' and code = 'transport-actual-one-way').exists() implies extension.where(url = 'http://fhir.hl7.org.vn/core/StructureDefinition/vn-ext-insurance-cost-info').extension.where(url = 'insuranceLineAmount').value.ofType(Money).value = extension.where(url = 'http://fhir.hl7.org.vn/core/StructureDefinition/vn-ext-line-payment-allocation').extension.value.ofType(Money).value.aggregate($total + $this, 0))
vn-cost-statement-line-quantity-amount-required error Invoice Dòng chi phí phải có số lượng và thành tiền bệnh viện, trừ nhánh người bệnh tự túc phương tiện vận chuyển. A cost line SHALL carry quantity and hospital amount unless it is a patient-arranged transport line. lineItem.all(extension.where(url = 'http://fhir.hl7.org.vn/core/StructureDefinition/vn-ext-cost-calculation-context').extension.where(url = 'calculationBasis').value.ofType(CodeableConcept).coding.where(system = 'http://fhir.hl7.org.vn/core/CodeSystem/vn-cost-calculation-axis-cs' and code = 'transport-actual-one-way').exists() or (priceComponent.where(type = 'base').factor.exists() and priceComponent.where(type = 'base').amount.value.exists()))
vn-cost-statement-line-segment-exists error Invoice Mỗi dòng chi phí phải trỏ về một phân đoạn có thật trên bảng kê. Every line SHALL reference an existing segment sequence. lineItem.extension.where(url = 'http://fhir.hl7.org.vn/core/StructureDefinition/vn-ext-cost-statement-line').extension.where(url = 'segmentSequence').value.ofType(positiveInt).all($this in %resource.extension.where(url = 'http://fhir.hl7.org.vn/core/StructureDefinition/vn-ext-cost-statement-segment').extension.where(url = 'sequence').value.ofType(positiveInt))
vn-cost-statement-line-unit-price-required error Invoice Dòng chi phí không trỏ ChargeItem phải tự khai đơn vị tính và đơn giá bệnh viện — cột (2) và (4) của mẫu QĐ 697/QĐ-BYT. A line without a ChargeItem reference SHALL carry unit and hospitalUnitPrice. lineItem.where(chargeItem.ofType(Reference).exists().not()).all(extension.where(url = 'http://fhir.hl7.org.vn/core/StructureDefinition/vn-ext-cost-statement-line').extension.where(url = 'unit').exists() and extension.where(url = 'http://fhir.hl7.org.vn/core/StructureDefinition/vn-ext-cost-statement-line').extension.where(url = 'hospitalUnitPrice').exists())
vn-cost-statement-money-vnd error Invoice Mọi giá trị tiền của bảng kê phải dùng VND. Every monetary value SHALL use VND. descendants().ofType(Money).all(currency = 'VND')
vn-cost-statement-package-component-category error Invoice Thiết bị thành phần chỉ khai trên dòng thuộc nhóm chi phí gói thiết bị y tế (mã 10). Package components SHALL only appear on lines in the medical-device package category. lineItem.all(extension.where(url = 'http://fhir.hl7.org.vn/core/StructureDefinition/vn-ext-cost-statement-line').all(extension.where(url = 'packageComponent').exists() implies extension.where(url = 'category').value.ofType(CodeableConcept).coding.where(system = 'http://fhir.hl7.org.vn/core/CodeSystem/vn-cost-category-cs' and code = '10').exists()))
vn-cost-statement-related-service-exists error Invoice Dòng gói thiết bị trỏ tới dịch vụ kỹ thuật nào thì dòng đó phải có thật trên bảng kê. A referenced technical-service line SHALL exist on the same statement. lineItem.extension.where(url = 'http://fhir.hl7.org.vn/core/StructureDefinition/vn-ext-cost-statement-line').extension.where(url = 'relatedServiceSequence').value.ofType(positiveInt).all($this in %resource.lineItem.sequence)
vn-cost-statement-segment-benefit-range error Invoice.extension:segment Mức hưởng của phân đoạn phải nằm trong khoảng 0–100. The segment benefit level SHALL be between 0 and 100. extension.where(url = 'benefitLevel').value.ofType(decimal).all($this >= 0 and $this <= 100)
vn-cost-statement-segment-sequence-unique error Invoice Mỗi sequence phân đoạn phải duy nhất trong bảng kê. Every segment sequence SHALL be unique within the cost statement. extension.where(url = 'http://fhir.hl7.org.vn/core/StructureDefinition/vn-ext-cost-statement-segment').extension.where(url = 'sequence').value.ofType(positiveInt).isDistinct()
vn-cost-statement-total-sum error Invoice Tổng bảng kê phải bằng tổng thành tiền của mọi dòng. The statement total SHALL equal the sum of all line amounts. totalNet.value.exists() implies totalNet.value = lineItem.priceComponent.where(type = 'base').amount.value.aggregate($total + $this, 0)
vn-cost-statement-transport-line-category error Invoice Dòng khai vai trò vận chuyển người bệnh phải thuộc nhóm chi phí vận chuyển (mã 11), và ngược lại. A patient-transport line role and the transport cost category SHALL agree. lineItem.all(extension.where(url = 'http://fhir.hl7.org.vn/core/StructureDefinition/vn-ext-cost-calculation-context').extension.where(url = 'lineRole').value.ofType(CodeableConcept).coding.where(system = 'http://fhir.hl7.org.vn/core/CodeSystem/vn-cost-calculation-axis-cs' and code = 'patient-transport').exists() = extension.where(url = 'http://fhir.hl7.org.vn/core/StructureDefinition/vn-ext-cost-statement-line').extension.where(url = 'category').value.ofType(CodeableConcept).coding.where(system = 'http://fhir.hl7.org.vn/core/CodeSystem/vn-cost-category-cs' and code = '11').exists())
vn-cost-statement-uninsured-line-defaults error Invoice Cột số (8) của dòng không có thẻ BHYT phải bằng 0 và cột số (13) phải bằng cột số (7). For every line owned by a segment without Coverage, column 8 SHALL be explicitly 0 and column 13 SHALL equal column 7. %resource.lineItem.where(extension.where(url = 'http://fhir.hl7.org.vn/core/StructureDefinition/vn-ext-cost-statement-line').extension.where(url = 'segmentSequence').value.ofType(positiveInt).intersect(%resource.extension.where(url = 'http://fhir.hl7.org.vn/core/StructureDefinition/vn-ext-cost-statement-segment').where(extension.where(url = 'coverage').empty()).extension.where(url = 'sequence').value.ofType(positiveInt)).exists()).all(extension.where(url = 'http://fhir.hl7.org.vn/core/StructureDefinition/vn-ext-insurance-cost-info').extension.where(url = 'paymentRatio').value.ofType(decimal) = 0 and extension.where(url = 'http://fhir.hl7.org.vn/core/StructureDefinition/vn-ext-line-payment-allocation').extension.where(url = 'patientSelfPay').value.ofType(Money).value = priceComponent.where(type = 'base').amount.value)
vn-cost-statement-uninsured-no-benefit error Invoice.extension:segment Phân đoạn không có thẻ BHYT thì không được khai mức hưởng. A segment without a Coverage SHALL NOT declare a benefit level. extension.where(url = 'coverage').empty() implies extension.where(url = 'benefitLevel').empty()
vn-insurance-cost-ratio-and-lexical error Invoice.lineItem.extension:insuranceCostInfo Các tỷ lệ phải nằm trong khoảng 0-100; chuỗi lexical gốc nếu có phải đi kèm paymentRatio; khoảng hiệu lực trần nếu có phải đi kèm paymentCeiling. Percentage values SHALL be within 0-100; a source lexical string SHALL accompany paymentRatio; a ceiling period SHALL accompany paymentCeiling. extension.where(url = 'paymentRatio').value.ofType(decimal).all($this >= 0 and $this <= 100) and extension.where(url = 'servicePaymentRatio').value.ofType(decimal).all($this >= 0 and $this <= 100) and extension.where(url = 'benefitLevel').value.ofType(decimal).all($this >= 0 and $this <= 100) and (extension.where(url = 'paymentRatioSourceLexical').empty() or extension.where(url = 'paymentRatio').exists()) and (extension.where(url = 'paymentCeilingPeriod').empty() or extension.where(url = 'paymentCeiling').exists())
vn-line-payment-allocation-nonnegative error Invoice.lineItem.extension:linePaymentAllocation Mọi khoản tiền phân bổ phải lớn hơn hoặc bằng 0. Every allocated Money value SHALL be greater than or equal to zero. extension.value.ofType(Money).all(value >= 0)
vn-line-payment-allocation-vnd error Invoice.lineItem.extension:linePaymentAllocation Mọi khoản tiền phân bổ phải dùng VND. Every allocated Money value SHALL use VND. extension.value.ofType(Money).all(currency = 'VND')

Dạng xem phần tử chính

NameFlagsCard.TypeDescription & Constraints    Filter: Filtersdoco
.. Invoice C 0..* Invoice Invoice containing ChargeItems from an Account
Constraints: vn-cost-statement-segment-sequence-unique, vn-cost-statement-line-segment-exists, vn-cost-statement-line-unit-price-required, vn-cost-statement-money-vnd, vn-cost-statement-line-quantity-amount-required, vn-cost-statement-transport-line-category, vn-cost-statement-total-sum, vn-cost-statement-issued-allocation-complete, vn-cost-statement-package-component-category, vn-cost-statement-related-service-exists, vn-cost-statement-uninsured-line-defaults
... implicitRules ?!Σ 0..1 uri A set of rules under which this content was created
... Slices for extension 1..* Extension Extension
Slice: Unordered, Open by value:url
.... extension:segment SC 1..* (Complex) Phân đoạn thẻ và mức hưởng của đợt khám
URL: http://fhir.hl7.org.vn/core/StructureDefinition/vn-ext-cost-statement-segment
Constraints: vn-cost-statement-segment-benefit-range, vn-cost-statement-uninsured-no-benefit
... modifierExtension ?! 0..* Extension Extensions that cannot be ignored
.... identifier:MALK SΣ 1..1 Identifier Mã liên kết hồ sơ (MA_LK) — khoá nối bảng kê, bản ký và các hồ sơ đề nghị thanh toán của cùng đợt
..... use ?!Σ 0..1 code usual | official | temp | secondary | old (If known)
Binding: IdentifierUse (required): Identifies the purpose for this identifier, if known .
..... type Σ 0..1 CodeableConcept Description of identifier
Binding: Identifier Type Codes (extensible): A coded type for an identifier that can be used to determine which identifier to use for a specific purpose.
Required Pattern: At least the following
...... id 0..1 string Unique id for inter-element referencing
...... extension 0..* Extension Additional content defined by implementations
...... coding 1..* Coding Code defined by a terminology system
Fixed Value: (Complex)
....... id 0..1 string Unique id for inter-element referencing
....... extension 0..* Extension Additional content defined by implementations
....... system 1..1 uri Identity of the terminology system
Fixed Value: http://fhir.hl7.org.vn/core/CodeSystem/vn-identifier-type-cs
....... version 0..1 string Version of the system - if relevant
....... code 1..1 code Symbol in syntax defined by the system
Fixed Value: MA_LK
....... display 0..1 string Representation defined by the system
....... userSelected 0..1 boolean If this coding was chosen directly by the user
...... text 0..1 string Plain text representation of the concept
..... system Σ 1..1 uri The namespace for the identifier value
Fixed Value: http://fhir.hl7.org.vn/core/sid/ma-lk
..... value SΣ 1..1 string Giá trị MA_LK
Example General: 123456
... status ?!SΣ 1..1 code Trạng thái bảng kê: draft | issued | balanced | cancelled | entered-in-error
Binding: InvoiceStatus (required): Codes identifying the lifecycle stage of an Invoice.
... type SΣ 0..1 CodeableConcept Loại bảng kê
... subject SΣ 1..1 Reference(Bệnh nhân VN Core — VN Core Patient Profile) Người bệnh của lượt khám
... recipient SΣ 0..1 Reference(Bệnh nhân VN Core — VN Core Patient Profile | Người liên quan/người giám hộ VN Core — VN Core RelatedPerson Profile | Cơ sở y tế VN Core — VN Core Organization Profile) Bên nhận bảng kê — thường là chính người bệnh hoặc người đại diện
... date SΣ 1..1 dateTime Ngày lập bảng kê
... issuer S 1..1 Reference(Cơ sở y tế VN Core — VN Core Organization Profile) Cơ sở khám bệnh, chữa bệnh lập bảng kê
... account S 1..1 Reference(Tài khoản viện phí — VN Core Account) Tài khoản viện phí của đợt điều trị mà bảng kê này tổng hợp
... lineItem SC 1..* BackboneElement Dòng chi phí của bảng kê
Constraints: vn-cost-statement-line-allocation-sum
.... Slices for extension 1..* Extension Extension
Slice: Unordered, Open by value:url
..... extension:calculation SC 0..1 (Complex) Ngữ cảnh tính: vai trò dòng, cơ sở tính, quy tắc trần, miễn trần, bộ công thức
URL: http://fhir.hl7.org.vn/core/StructureDefinition/vn-ext-cost-calculation-context
Constraints: vn-cost-calculation-stent-ordinal, vn-cost-calculation-exemption-needs-cap, vn-cost-calculation-transport-basis-coherent
..... extension:line S 1..1 (Complex) Phân đoạn thẻ, nhóm chi phí và ngày thực hiện của dòng
URL: http://fhir.hl7.org.vn/core/StructureDefinition/vn-ext-cost-statement-line
..... extension:insuranceCostInfo SC 0..1 (Complex) Đơn giá BH, tỷ lệ thanh toán và thành tiền BH — cột 5, 6, 8, 9
URL: http://fhir.hl7.org.vn/core/StructureDefinition/vn-ext-insurance-cost-info
Constraints: vn-insurance-cost-ratio-and-lexical
..... extension:linePaymentAllocation SC 0..1 (Complex) Bốn nguồn thanh toán — cột 10 đến 13
URL: http://fhir.hl7.org.vn/core/StructureDefinition/vn-ext-line-payment-allocation
Constraints: vn-line-payment-allocation-vnd, vn-line-payment-allocation-nonnegative
.... modifierExtension ?!Σ 0..* Extension Extensions that cannot be ignored even if unrecognized
.... sequence S 1..1 positiveInt Sequence number of line item
.... chargeItem[x] S 1..1 Mã dịch vụ, thuốc hoặc vật tư của dòng; dùng Reference(ChargeItem) khi hệ thống đã có ChargeItem
..... chargeItemReference Reference(ChargeItem)
..... chargeItemCodeableConcept CodeableConcept
.... Slices for priceComponent S 1..* BackboneElement Thành phần giá của dòng; lát `base` mang số lượng và thành tiền bệnh viện
Slice: Unordered, Open by value:type
..... priceComponent:All Slices Content/Rules for all slices
...... modifierExtension ?!Σ 0..* Extension Extensions that cannot be ignored even if unrecognized
...... type S 1..1 code base | surcharge | deduction | discount | tax | informational
Binding: InvoicePriceComponentType (required): Codes indicating the kind of the price component.
...... amount 0..1 Money Thành tiền của thành phần, VND
....... currency Σ 1..1 code ISO 4217 Currency Code
Binding: Currencies (required): A code indicating the currency, taken from ISO 4217.
Fixed Value: VND
..... priceComponent:base S 1..1 BackboneElement Components of total line item price
...... modifierExtension ?!Σ 0..* Extension Extensions that cannot be ignored even if unrecognized
...... type S 1..1 code base | surcharge | deduction | discount | tax | informational
Binding: InvoicePriceComponentType (required): Codes indicating the kind of the price component.
Fixed Value: base
...... factor S 0..1 decimal Số lượng của dòng — cột (3) của mẫu; trống ở nhánh người bệnh tự túc phương tiện
...... amount S 0..1 Money Thành tiền bệnh viện — cột (7) của mẫu; trống ở nhánh người bệnh tự túc phương tiện
....... value SΣ 1..1 decimal Numerical value (with implicit precision)
....... currency Σ 1..1 code ISO 4217 Currency Code
Binding: Currencies (required): A code indicating the currency, taken from ISO 4217.
Fixed Value: VND
... totalNet SΣ 1..1 Money Tổng thành tiền bệnh viện của cả đợt khám
.... currency Σ 1..1 code ISO 4217 Currency Code
Binding: Currencies (required): A code indicating the currency, taken from ISO 4217.
Fixed Value: VND
... totalGross SΣ 0..1 Money Tổng sau các khoản cộng thêm, nếu có

doco Documentation for this format

Terminology Bindings

Path Status Usage ValueSet Version Source
Invoice.identifier:MALK.​use Base required IdentifierUse 📍4.0.1 FHIR Std.
Invoice.identifier:MALK.​type Base extensible IdentifierType 📍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.
Invoice.lineItem.priceComponent.​amount.currency Base required CurrencyCode 📍4.0.1 FHIR Std.
Invoice.lineItem.priceComponent:base.​type Base required InvoicePriceComponentType 📍4.0.1 FHIR Std.
Invoice.lineItem.priceComponent:base.​amount.currency Base required CurrencyCode 📍4.0.1 FHIR Std.
Invoice.totalNet.currency Base required CurrencyCode 📍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()
vn-cost-calculation-exemption-needs-cap error Invoice.lineItem.extension:calculation Chỉ khai miễn trần khi dòng đang áp một quy tắc trần. A cap exemption SHALL NOT be declared on a line with no cap rule. extension.where(url = 'exemption').empty() or extension.where(url = 'capRule').value.ofType(CodeableConcept).coding.where(system = 'http://fhir.hl7.org.vn/core/CodeSystem/vn-cost-calculation-axis-cs' and code = 'no-cap').empty()
vn-cost-calculation-stent-ordinal error Invoice.lineItem.extension:calculation Dòng stent bổ sung phải khai thứ tự trong khoảng 2-4. An additional-stent line SHALL declare an ordinal between 2 and 4. extension.where(url = 'lineRole').value.ofType(CodeableConcept).coding.where(system = 'http://fhir.hl7.org.vn/core/CodeSystem/vn-cost-calculation-axis-cs' and code = 'additional-stent').empty() or extension.where(url = 'ordinal').value.ofType(positiveInt).where($this >= 2 and $this <= 4).exists()
vn-cost-calculation-transport-basis-coherent error Invoice.lineItem.extension:calculation Cơ sở tính vận chuyển và vai trò dòng vận chuyển phải đi cùng nhau. A transport calculation basis and the patient-transport line role SHALL be used together. extension.where(url = 'calculationBasis').value.ofType(CodeableConcept).coding.where(system = 'http://fhir.hl7.org.vn/core/CodeSystem/vn-cost-calculation-axis-cs' and (code = 'transport-kilometre' or code = 'transport-fuel' or code = 'transport-actual-one-way')).exists() = extension.where(url = 'lineRole').value.ofType(CodeableConcept).coding.where(system = 'http://fhir.hl7.org.vn/core/CodeSystem/vn-cost-calculation-axis-cs' and code = 'patient-transport').exists()
vn-cost-statement-issued-allocation-complete error Invoice Bảng kê đã phát hành hoặc đã cân đối thì mọi dòng phải có phân bổ bốn nguồn thanh toán (cột 10–13). An issued or balanced statement SHALL allocate every line across the four payment sources. status.where($this = 'issued' or $this = 'balanced').empty() or lineItem.all(extension.where(url = 'http://fhir.hl7.org.vn/core/StructureDefinition/vn-ext-line-payment-allocation').exists())
vn-cost-statement-line-allocation-sum error Invoice.lineItem Thành tiền của dòng phải bằng tổng bốn nguồn thanh toán: quỹ BHYT, người bệnh cùng trả, nguồn khác và người bệnh tự trả. Dòng người bệnh tự túc phương tiện vận chuyển đối chiếu với cột (9) vì không có cột (7). The line amount SHALL equal the sum of the four payment sources; a patient-arranged transport line is checked against column 9 because it has no column 7. extension.where(url = 'http://fhir.hl7.org.vn/core/StructureDefinition/vn-ext-line-payment-allocation').exists() implies (extension.where(url = 'http://fhir.hl7.org.vn/core/StructureDefinition/vn-ext-cost-calculation-context').extension.where(url = 'calculationBasis').value.ofType(CodeableConcept).coding.where(system = 'http://fhir.hl7.org.vn/core/CodeSystem/vn-cost-calculation-axis-cs' and code = 'transport-actual-one-way').exists().not() implies priceComponent.where(type = 'base').amount.value = extension.where(url = 'http://fhir.hl7.org.vn/core/StructureDefinition/vn-ext-line-payment-allocation').extension.value.ofType(Money).value.aggregate($total + $this, 0)) and (extension.where(url = 'http://fhir.hl7.org.vn/core/StructureDefinition/vn-ext-cost-calculation-context').extension.where(url = 'calculationBasis').value.ofType(CodeableConcept).coding.where(system = 'http://fhir.hl7.org.vn/core/CodeSystem/vn-cost-calculation-axis-cs' and code = 'transport-actual-one-way').exists() implies extension.where(url = 'http://fhir.hl7.org.vn/core/StructureDefinition/vn-ext-insurance-cost-info').extension.where(url = 'insuranceLineAmount').value.ofType(Money).value = extension.where(url = 'http://fhir.hl7.org.vn/core/StructureDefinition/vn-ext-line-payment-allocation').extension.value.ofType(Money).value.aggregate($total + $this, 0))
vn-cost-statement-line-quantity-amount-required error Invoice Dòng chi phí phải có số lượng và thành tiền bệnh viện, trừ nhánh người bệnh tự túc phương tiện vận chuyển. A cost line SHALL carry quantity and hospital amount unless it is a patient-arranged transport line. lineItem.all(extension.where(url = 'http://fhir.hl7.org.vn/core/StructureDefinition/vn-ext-cost-calculation-context').extension.where(url = 'calculationBasis').value.ofType(CodeableConcept).coding.where(system = 'http://fhir.hl7.org.vn/core/CodeSystem/vn-cost-calculation-axis-cs' and code = 'transport-actual-one-way').exists() or (priceComponent.where(type = 'base').factor.exists() and priceComponent.where(type = 'base').amount.value.exists()))
vn-cost-statement-line-segment-exists error Invoice Mỗi dòng chi phí phải trỏ về một phân đoạn có thật trên bảng kê. Every line SHALL reference an existing segment sequence. lineItem.extension.where(url = 'http://fhir.hl7.org.vn/core/StructureDefinition/vn-ext-cost-statement-line').extension.where(url = 'segmentSequence').value.ofType(positiveInt).all($this in %resource.extension.where(url = 'http://fhir.hl7.org.vn/core/StructureDefinition/vn-ext-cost-statement-segment').extension.where(url = 'sequence').value.ofType(positiveInt))
vn-cost-statement-line-unit-price-required error Invoice Dòng chi phí không trỏ ChargeItem phải tự khai đơn vị tính và đơn giá bệnh viện — cột (2) và (4) của mẫu QĐ 697/QĐ-BYT. A line without a ChargeItem reference SHALL carry unit and hospitalUnitPrice. lineItem.where(chargeItem.ofType(Reference).exists().not()).all(extension.where(url = 'http://fhir.hl7.org.vn/core/StructureDefinition/vn-ext-cost-statement-line').extension.where(url = 'unit').exists() and extension.where(url = 'http://fhir.hl7.org.vn/core/StructureDefinition/vn-ext-cost-statement-line').extension.where(url = 'hospitalUnitPrice').exists())
vn-cost-statement-money-vnd error Invoice Mọi giá trị tiền của bảng kê phải dùng VND. Every monetary value SHALL use VND. descendants().ofType(Money).all(currency = 'VND')
vn-cost-statement-package-component-category error Invoice Thiết bị thành phần chỉ khai trên dòng thuộc nhóm chi phí gói thiết bị y tế (mã 10). Package components SHALL only appear on lines in the medical-device package category. lineItem.all(extension.where(url = 'http://fhir.hl7.org.vn/core/StructureDefinition/vn-ext-cost-statement-line').all(extension.where(url = 'packageComponent').exists() implies extension.where(url = 'category').value.ofType(CodeableConcept).coding.where(system = 'http://fhir.hl7.org.vn/core/CodeSystem/vn-cost-category-cs' and code = '10').exists()))
vn-cost-statement-related-service-exists error Invoice Dòng gói thiết bị trỏ tới dịch vụ kỹ thuật nào thì dòng đó phải có thật trên bảng kê. A referenced technical-service line SHALL exist on the same statement. lineItem.extension.where(url = 'http://fhir.hl7.org.vn/core/StructureDefinition/vn-ext-cost-statement-line').extension.where(url = 'relatedServiceSequence').value.ofType(positiveInt).all($this in %resource.lineItem.sequence)
vn-cost-statement-segment-benefit-range error Invoice.extension:segment Mức hưởng của phân đoạn phải nằm trong khoảng 0–100. The segment benefit level SHALL be between 0 and 100. extension.where(url = 'benefitLevel').value.ofType(decimal).all($this >= 0 and $this <= 100)
vn-cost-statement-segment-sequence-unique error Invoice Mỗi sequence phân đoạn phải duy nhất trong bảng kê. Every segment sequence SHALL be unique within the cost statement. extension.where(url = 'http://fhir.hl7.org.vn/core/StructureDefinition/vn-ext-cost-statement-segment').extension.where(url = 'sequence').value.ofType(positiveInt).isDistinct()
vn-cost-statement-total-sum error Invoice Tổng bảng kê phải bằng tổng thành tiền của mọi dòng. The statement total SHALL equal the sum of all line amounts. totalNet.value.exists() implies totalNet.value = lineItem.priceComponent.where(type = 'base').amount.value.aggregate($total + $this, 0)
vn-cost-statement-transport-line-category error Invoice Dòng khai vai trò vận chuyển người bệnh phải thuộc nhóm chi phí vận chuyển (mã 11), và ngược lại. A patient-transport line role and the transport cost category SHALL agree. lineItem.all(extension.where(url = 'http://fhir.hl7.org.vn/core/StructureDefinition/vn-ext-cost-calculation-context').extension.where(url = 'lineRole').value.ofType(CodeableConcept).coding.where(system = 'http://fhir.hl7.org.vn/core/CodeSystem/vn-cost-calculation-axis-cs' and code = 'patient-transport').exists() = extension.where(url = 'http://fhir.hl7.org.vn/core/StructureDefinition/vn-ext-cost-statement-line').extension.where(url = 'category').value.ofType(CodeableConcept).coding.where(system = 'http://fhir.hl7.org.vn/core/CodeSystem/vn-cost-category-cs' and code = '11').exists())
vn-cost-statement-uninsured-line-defaults error Invoice Cột số (8) của dòng không có thẻ BHYT phải bằng 0 và cột số (13) phải bằng cột số (7). For every line owned by a segment without Coverage, column 8 SHALL be explicitly 0 and column 13 SHALL equal column 7. %resource.lineItem.where(extension.where(url = 'http://fhir.hl7.org.vn/core/StructureDefinition/vn-ext-cost-statement-line').extension.where(url = 'segmentSequence').value.ofType(positiveInt).intersect(%resource.extension.where(url = 'http://fhir.hl7.org.vn/core/StructureDefinition/vn-ext-cost-statement-segment').where(extension.where(url = 'coverage').empty()).extension.where(url = 'sequence').value.ofType(positiveInt)).exists()).all(extension.where(url = 'http://fhir.hl7.org.vn/core/StructureDefinition/vn-ext-insurance-cost-info').extension.where(url = 'paymentRatio').value.ofType(decimal) = 0 and extension.where(url = 'http://fhir.hl7.org.vn/core/StructureDefinition/vn-ext-line-payment-allocation').extension.where(url = 'patientSelfPay').value.ofType(Money).value = priceComponent.where(type = 'base').amount.value)
vn-cost-statement-uninsured-no-benefit error Invoice.extension:segment Phân đoạn không có thẻ BHYT thì không được khai mức hưởng. A segment without a Coverage SHALL NOT declare a benefit level. extension.where(url = 'coverage').empty() implies extension.where(url = 'benefitLevel').empty()
vn-insurance-cost-ratio-and-lexical error Invoice.lineItem.extension:insuranceCostInfo Các tỷ lệ phải nằm trong khoảng 0-100; chuỗi lexical gốc nếu có phải đi kèm paymentRatio; khoảng hiệu lực trần nếu có phải đi kèm paymentCeiling. Percentage values SHALL be within 0-100; a source lexical string SHALL accompany paymentRatio; a ceiling period SHALL accompany paymentCeiling. extension.where(url = 'paymentRatio').value.ofType(decimal).all($this >= 0 and $this <= 100) and extension.where(url = 'servicePaymentRatio').value.ofType(decimal).all($this >= 0 and $this <= 100) and extension.where(url = 'benefitLevel').value.ofType(decimal).all($this >= 0 and $this <= 100) and (extension.where(url = 'paymentRatioSourceLexical').empty() or extension.where(url = 'paymentRatio').exists()) and (extension.where(url = 'paymentCeilingPeriod').empty() or extension.where(url = 'paymentCeiling').exists())
vn-line-payment-allocation-nonnegative error Invoice.lineItem.extension:linePaymentAllocation Mọi khoản tiền phân bổ phải lớn hơn hoặc bằng 0. Every allocated Money value SHALL be greater than or equal to zero. extension.value.ofType(Money).all(value >= 0)
vn-line-payment-allocation-vnd error Invoice.lineItem.extension:linePaymentAllocation Mọi khoản tiền phân bổ phải dùng VND. Every allocated Money value SHALL use VND. extension.value.ofType(Money).all(currency = 'VND')

Dạng xem Differential

NameFlagsCard.TypeDescription & Constraints    Filter: Filtersdoco
.. Invoice C 0..* Invoice Invoice containing ChargeItems from an Account
Constraints: vn-cost-statement-segment-sequence-unique, vn-cost-statement-line-segment-exists, vn-cost-statement-line-unit-price-required, vn-cost-statement-money-vnd, vn-cost-statement-line-quantity-amount-required, vn-cost-statement-transport-line-category, vn-cost-statement-total-sum, vn-cost-statement-issued-allocation-complete, vn-cost-statement-package-component-category, vn-cost-statement-related-service-exists, vn-cost-statement-uninsured-line-defaults
... Slices for extension 1..* Extension Extension
Slice: Unordered, Open by value:url
.... extension:segment SC 1..* (Complex) Phân đoạn thẻ và mức hưởng của đợt khám
URL: http://fhir.hl7.org.vn/core/StructureDefinition/vn-ext-cost-statement-segment
Constraints: vn-cost-statement-uninsured-no-benefit
... Slices for identifier S 1..* Identifier Mã lượt khám chữa bệnh (MA_LK) và số bảng kê
Slice: Unordered, Open by value:system
.... identifier:MALK S 1..1 Identifier Mã liên kết hồ sơ (MA_LK) — khoá nối bảng kê, bản ký và các hồ sơ đề nghị thanh toán của cùng đợt
..... type 0..1 CodeableConcept Description of identifier
Required Pattern: At least the following
...... coding 1..* Coding Code defined by a terminology system
Fixed Value: (Complex)
....... system 1..1 uri Identity of the terminology system
Fixed Value: http://fhir.hl7.org.vn/core/CodeSystem/vn-identifier-type-cs
....... code 1..1 code Symbol in syntax defined by the system
Fixed Value: MA_LK
..... system 1..1 uri The namespace for the identifier value
Fixed Value: http://fhir.hl7.org.vn/core/sid/ma-lk
..... value S 1..1 string Giá trị MA_LK
... status S 1..1 code Trạng thái bảng kê: draft | issued | balanced | cancelled | entered-in-error
... subject S 1..1 Reference(Bệnh nhân VN Core — VN Core Patient Profile) Người bệnh của lượt khám
... recipient S 0..1 Reference(Bệnh nhân VN Core — VN Core Patient Profile | Người liên quan/người giám hộ VN Core — VN Core RelatedPerson Profile | Cơ sở y tế VN Core — VN Core Organization Profile) Bên nhận bảng kê — thường là chính người bệnh hoặc người đại diện
... date S 1..1 dateTime Ngày lập bảng kê
... issuer S 1..1 Reference(Cơ sở y tế VN Core — VN Core Organization Profile) Cơ sở khám bệnh, chữa bệnh lập bảng kê
... account S 1..1 Reference(Tài khoản viện phí — VN Core Account) Tài khoản viện phí của đợt điều trị mà bảng kê này tổng hợp
... lineItem SC 1..* BackboneElement Dòng chi phí của bảng kê
Constraints: vn-cost-statement-line-allocation-sum
.... Slices for extension 1..* Extension Extension
Slice: Unordered, Open by value:url
..... extension:calculation S 0..1 (Complex) Ngữ cảnh tính: vai trò dòng, cơ sở tính, quy tắc trần, miễn trần, bộ công thức
URL: http://fhir.hl7.org.vn/core/StructureDefinition/vn-ext-cost-calculation-context
..... extension:line S 1..1 (Complex) Phân đoạn thẻ, nhóm chi phí và ngày thực hiện của dòng
URL: http://fhir.hl7.org.vn/core/StructureDefinition/vn-ext-cost-statement-line
..... extension:insuranceCostInfo S 0..1 (Complex) Đơn giá BH, tỷ lệ thanh toán và thành tiền BH — cột 5, 6, 8, 9
URL: http://fhir.hl7.org.vn/core/StructureDefinition/vn-ext-insurance-cost-info
..... extension:linePaymentAllocation S 0..1 (Complex) Bốn nguồn thanh toán — cột 10 đến 13
URL: http://fhir.hl7.org.vn/core/StructureDefinition/vn-ext-line-payment-allocation
.... sequence S 1..1 positiveInt Sequence number of line item
.... chargeItem[x] S 1..1 Reference(ChargeItem), CodeableConcept Mã dịch vụ, thuốc hoặc vật tư của dòng; dùng Reference(ChargeItem) khi hệ thống đã có ChargeItem
.... Slices for priceComponent S 1..* BackboneElement Thành phần giá của dòng; lát `base` mang số lượng và thành tiền bệnh viện
Slice: Unordered, Open by value:type
..... priceComponent:All Slices Content/Rules for all slices
...... type S 1..1 code base | surcharge | deduction | discount | tax | informational
...... amount 0..1 Money Thành tiền của thành phần, VND
....... currency 1..1 code ISO 4217 Currency Code
Fixed Value: VND
..... priceComponent:base S 1..1 BackboneElement Components of total line item price
...... type S 1..1 code base | surcharge | deduction | discount | tax | informational
Fixed Value: base
...... factor S 0..1 decimal Số lượng của dòng — cột (3) của mẫu; trống ở nhánh người bệnh tự túc phương tiện
...... amount S 0..1 Money Thành tiền bệnh viện — cột (7) của mẫu; trống ở nhánh người bệnh tự túc phương tiện
....... value S 1..1 decimal Numerical value (with implicit precision)
....... currency 1..1 code ISO 4217 Currency Code
Fixed Value: VND
... totalNet S 1..1 Money Tổng thành tiền bệnh viện của cả đợt khám
.... currency 1..1 code ISO 4217 Currency Code
Fixed Value: VND
... totalGross S 0..1 Money Tổng sau các khoản cộng thêm, nếu có

doco Documentation for this format

Constraints

Id Grade Path(s) Description Expression
vn-cost-statement-issued-allocation-complete error Invoice Bảng kê đã phát hành hoặc đã cân đối thì mọi dòng phải có phân bổ bốn nguồn thanh toán (cột 10–13). An issued or balanced statement SHALL allocate every line across the four payment sources. status.where($this = 'issued' or $this = 'balanced').empty() or lineItem.all(extension.where(url = 'http://fhir.hl7.org.vn/core/StructureDefinition/vn-ext-line-payment-allocation').exists())
vn-cost-statement-line-allocation-sum error Invoice.lineItem Thành tiền của dòng phải bằng tổng bốn nguồn thanh toán: quỹ BHYT, người bệnh cùng trả, nguồn khác và người bệnh tự trả. Dòng người bệnh tự túc phương tiện vận chuyển đối chiếu với cột (9) vì không có cột (7). The line amount SHALL equal the sum of the four payment sources; a patient-arranged transport line is checked against column 9 because it has no column 7. extension.where(url = 'http://fhir.hl7.org.vn/core/StructureDefinition/vn-ext-line-payment-allocation').exists() implies (extension.where(url = 'http://fhir.hl7.org.vn/core/StructureDefinition/vn-ext-cost-calculation-context').extension.where(url = 'calculationBasis').value.ofType(CodeableConcept).coding.where(system = 'http://fhir.hl7.org.vn/core/CodeSystem/vn-cost-calculation-axis-cs' and code = 'transport-actual-one-way').exists().not() implies priceComponent.where(type = 'base').amount.value = extension.where(url = 'http://fhir.hl7.org.vn/core/StructureDefinition/vn-ext-line-payment-allocation').extension.value.ofType(Money).value.aggregate($total + $this, 0)) and (extension.where(url = 'http://fhir.hl7.org.vn/core/StructureDefinition/vn-ext-cost-calculation-context').extension.where(url = 'calculationBasis').value.ofType(CodeableConcept).coding.where(system = 'http://fhir.hl7.org.vn/core/CodeSystem/vn-cost-calculation-axis-cs' and code = 'transport-actual-one-way').exists() implies extension.where(url = 'http://fhir.hl7.org.vn/core/StructureDefinition/vn-ext-insurance-cost-info').extension.where(url = 'insuranceLineAmount').value.ofType(Money).value = extension.where(url = 'http://fhir.hl7.org.vn/core/StructureDefinition/vn-ext-line-payment-allocation').extension.value.ofType(Money).value.aggregate($total + $this, 0))
vn-cost-statement-line-quantity-amount-required error Invoice Dòng chi phí phải có số lượng và thành tiền bệnh viện, trừ nhánh người bệnh tự túc phương tiện vận chuyển. A cost line SHALL carry quantity and hospital amount unless it is a patient-arranged transport line. lineItem.all(extension.where(url = 'http://fhir.hl7.org.vn/core/StructureDefinition/vn-ext-cost-calculation-context').extension.where(url = 'calculationBasis').value.ofType(CodeableConcept).coding.where(system = 'http://fhir.hl7.org.vn/core/CodeSystem/vn-cost-calculation-axis-cs' and code = 'transport-actual-one-way').exists() or (priceComponent.where(type = 'base').factor.exists() and priceComponent.where(type = 'base').amount.value.exists()))
vn-cost-statement-line-segment-exists error Invoice Mỗi dòng chi phí phải trỏ về một phân đoạn có thật trên bảng kê. Every line SHALL reference an existing segment sequence. lineItem.extension.where(url = 'http://fhir.hl7.org.vn/core/StructureDefinition/vn-ext-cost-statement-line').extension.where(url = 'segmentSequence').value.ofType(positiveInt).all($this in %resource.extension.where(url = 'http://fhir.hl7.org.vn/core/StructureDefinition/vn-ext-cost-statement-segment').extension.where(url = 'sequence').value.ofType(positiveInt))
vn-cost-statement-line-unit-price-required error Invoice Dòng chi phí không trỏ ChargeItem phải tự khai đơn vị tính và đơn giá bệnh viện — cột (2) và (4) của mẫu QĐ 697/QĐ-BYT. A line without a ChargeItem reference SHALL carry unit and hospitalUnitPrice. lineItem.where(chargeItem.ofType(Reference).exists().not()).all(extension.where(url = 'http://fhir.hl7.org.vn/core/StructureDefinition/vn-ext-cost-statement-line').extension.where(url = 'unit').exists() and extension.where(url = 'http://fhir.hl7.org.vn/core/StructureDefinition/vn-ext-cost-statement-line').extension.where(url = 'hospitalUnitPrice').exists())
vn-cost-statement-money-vnd error Invoice Mọi giá trị tiền của bảng kê phải dùng VND. Every monetary value SHALL use VND. descendants().ofType(Money).all(currency = 'VND')
vn-cost-statement-package-component-category error Invoice Thiết bị thành phần chỉ khai trên dòng thuộc nhóm chi phí gói thiết bị y tế (mã 10). Package components SHALL only appear on lines in the medical-device package category. lineItem.all(extension.where(url = 'http://fhir.hl7.org.vn/core/StructureDefinition/vn-ext-cost-statement-line').all(extension.where(url = 'packageComponent').exists() implies extension.where(url = 'category').value.ofType(CodeableConcept).coding.where(system = 'http://fhir.hl7.org.vn/core/CodeSystem/vn-cost-category-cs' and code = '10').exists()))
vn-cost-statement-related-service-exists error Invoice Dòng gói thiết bị trỏ tới dịch vụ kỹ thuật nào thì dòng đó phải có thật trên bảng kê. A referenced technical-service line SHALL exist on the same statement. lineItem.extension.where(url = 'http://fhir.hl7.org.vn/core/StructureDefinition/vn-ext-cost-statement-line').extension.where(url = 'relatedServiceSequence').value.ofType(positiveInt).all($this in %resource.lineItem.sequence)
vn-cost-statement-segment-sequence-unique error Invoice Mỗi sequence phân đoạn phải duy nhất trong bảng kê. Every segment sequence SHALL be unique within the cost statement. extension.where(url = 'http://fhir.hl7.org.vn/core/StructureDefinition/vn-ext-cost-statement-segment').extension.where(url = 'sequence').value.ofType(positiveInt).isDistinct()
vn-cost-statement-total-sum error Invoice Tổng bảng kê phải bằng tổng thành tiền của mọi dòng. The statement total SHALL equal the sum of all line amounts. totalNet.value.exists() implies totalNet.value = lineItem.priceComponent.where(type = 'base').amount.value.aggregate($total + $this, 0)
vn-cost-statement-transport-line-category error Invoice Dòng khai vai trò vận chuyển người bệnh phải thuộc nhóm chi phí vận chuyển (mã 11), và ngược lại. A patient-transport line role and the transport cost category SHALL agree. lineItem.all(extension.where(url = 'http://fhir.hl7.org.vn/core/StructureDefinition/vn-ext-cost-calculation-context').extension.where(url = 'lineRole').value.ofType(CodeableConcept).coding.where(system = 'http://fhir.hl7.org.vn/core/CodeSystem/vn-cost-calculation-axis-cs' and code = 'patient-transport').exists() = extension.where(url = 'http://fhir.hl7.org.vn/core/StructureDefinition/vn-ext-cost-statement-line').extension.where(url = 'category').value.ofType(CodeableConcept).coding.where(system = 'http://fhir.hl7.org.vn/core/CodeSystem/vn-cost-category-cs' and code = '11').exists())
vn-cost-statement-uninsured-line-defaults error Invoice Cột số (8) của dòng không có thẻ BHYT phải bằng 0 và cột số (13) phải bằng cột số (7). For every line owned by a segment without Coverage, column 8 SHALL be explicitly 0 and column 13 SHALL equal column 7. %resource.lineItem.where(extension.where(url = 'http://fhir.hl7.org.vn/core/StructureDefinition/vn-ext-cost-statement-line').extension.where(url = 'segmentSequence').value.ofType(positiveInt).intersect(%resource.extension.where(url = 'http://fhir.hl7.org.vn/core/StructureDefinition/vn-ext-cost-statement-segment').where(extension.where(url = 'coverage').empty()).extension.where(url = 'sequence').value.ofType(positiveInt)).exists()).all(extension.where(url = 'http://fhir.hl7.org.vn/core/StructureDefinition/vn-ext-insurance-cost-info').extension.where(url = 'paymentRatio').value.ofType(decimal) = 0 and extension.where(url = 'http://fhir.hl7.org.vn/core/StructureDefinition/vn-ext-line-payment-allocation').extension.where(url = 'patientSelfPay').value.ofType(Money).value = priceComponent.where(type = 'base').amount.value)
vn-cost-statement-uninsured-no-benefit error Invoice.extension:segment Phân đoạn không có thẻ BHYT thì không được khai mức hưởng. A segment without a Coverage SHALL NOT declare a benefit level. extension.where(url = 'coverage').empty() implies extension.where(url = 'benefitLevel').empty()

Dạng xem SnapshotView

NameFlagsCard.TypeDescription & Constraints    Filter: Filtersdoco
.. Invoice C 0..* Invoice Invoice containing ChargeItems from an Account
Constraints: vn-cost-statement-segment-sequence-unique, vn-cost-statement-line-segment-exists, vn-cost-statement-line-unit-price-required, vn-cost-statement-money-vnd, vn-cost-statement-line-quantity-amount-required, vn-cost-statement-transport-line-category, vn-cost-statement-total-sum, vn-cost-statement-issued-allocation-complete, vn-cost-statement-package-component-category, vn-cost-statement-related-service-exists, vn-cost-statement-uninsured-line-defaults
... 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
... Slices for extension 1..* Extension Extension
Slice: Unordered, Open by value:url
.... extension:segment SC 1..* (Complex) Phân đoạn thẻ và mức hưởng của đợt khám
URL: http://fhir.hl7.org.vn/core/StructureDefinition/vn-ext-cost-statement-segment
Constraints: vn-cost-statement-segment-benefit-range, vn-cost-statement-uninsured-no-benefit
... modifierExtension ?! 0..* Extension Extensions that cannot be ignored
... Slices for identifier SΣ 1..* Identifier Mã lượt khám chữa bệnh (MA_LK) và số bảng kê
Slice: Unordered, Open by value:system
.... identifier:MALK SΣ 1..1 Identifier Mã liên kết hồ sơ (MA_LK) — khoá nối bảng kê, bản ký và các hồ sơ đề nghị thanh toán của cùng đợt
..... id 0..1 string Unique id for inter-element referencing
..... extension 0..* Extension Additional content defined by implementations
Slice: Unordered, Open by value:url
..... use ?!Σ 0..1 code usual | official | temp | secondary | old (If known)
Binding: IdentifierUse (required): Identifies the purpose for this identifier, if known .
..... type Σ 0..1 CodeableConcept Description of identifier
Binding: Identifier Type Codes (extensible): A coded type for an identifier that can be used to determine which identifier to use for a specific purpose.
Required Pattern: At least the following
...... id 0..1 string Unique id for inter-element referencing
...... extension 0..* Extension Additional content defined by implementations
...... coding 1..* Coding Code defined by a terminology system
Fixed Value: (Complex)
....... id 0..1 string Unique id for inter-element referencing
....... extension 0..* Extension Additional content defined by implementations
....... system 1..1 uri Identity of the terminology system
Fixed Value: http://fhir.hl7.org.vn/core/CodeSystem/vn-identifier-type-cs
....... version 0..1 string Version of the system - if relevant
....... code 1..1 code Symbol in syntax defined by the system
Fixed Value: MA_LK
....... display 0..1 string Representation defined by the system
....... userSelected 0..1 boolean If this coding was chosen directly by the user
...... text 0..1 string Plain text representation of the concept
..... system Σ 1..1 uri The namespace for the identifier value
Fixed Value: http://fhir.hl7.org.vn/core/sid/ma-lk
..... value SΣ 1..1 string Giá trị MA_LK
Example General: 123456
..... period Σ 0..1 Period Time period when id is/was valid for use
..... assigner Σ 0..1 Reference(Organization) Organization that issued id (may be just text)
... status ?!SΣ 1..1 code Trạng thái bảng kê: 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 Loại bảng kê
... subject SΣ 1..1 Reference(Bệnh nhân VN Core — VN Core Patient Profile) Người bệnh của lượt khám
... recipient SΣ 0..1 Reference(Bệnh nhân VN Core — VN Core Patient Profile | Người liên quan/người giám hộ VN Core — VN Core RelatedPerson Profile | Cơ sở y tế VN Core — VN Core Organization Profile) Bên nhận bảng kê — thường là chính người bệnh hoặc người đại diện
... date SΣ 1..1 dateTime Ngày lập bảng kê
... participant 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 Type of involvement in creation of this Invoice
.... actor 1..1 Reference(Practitioner | Organization | Patient | PractitionerRole | Device | RelatedPerson) Individual who was involved
... issuer S 1..1 Reference(Cơ sở y tế VN Core — VN Core Organization Profile) Cơ sở khám bệnh, chữa bệnh lập bảng kê
... account S 1..1 Reference(Tài khoản viện phí — VN Core Account) Tài khoản viện phí của đợt điều trị mà bảng kê này tổng hợp
... lineItem SC 1..* BackboneElement Dòng chi phí của bảng kê
Constraints: vn-cost-statement-line-allocation-sum
.... id 0..1 string Unique id for inter-element referencing
.... Slices for extension 1..* Extension Extension
Slice: Unordered, Open by value:url
..... extension:calculation SC 0..1 (Complex) Ngữ cảnh tính: vai trò dòng, cơ sở tính, quy tắc trần, miễn trần, bộ công thức
URL: http://fhir.hl7.org.vn/core/StructureDefinition/vn-ext-cost-calculation-context
Constraints: vn-cost-calculation-stent-ordinal, vn-cost-calculation-exemption-needs-cap, vn-cost-calculation-transport-basis-coherent
..... extension:line S 1..1 (Complex) Phân đoạn thẻ, nhóm chi phí và ngày thực hiện của dòng
URL: http://fhir.hl7.org.vn/core/StructureDefinition/vn-ext-cost-statement-line
..... extension:insuranceCostInfo SC 0..1 (Complex) Đơn giá BH, tỷ lệ thanh toán và thành tiền BH — cột 5, 6, 8, 9
URL: http://fhir.hl7.org.vn/core/StructureDefinition/vn-ext-insurance-cost-info
Constraints: vn-insurance-cost-ratio-and-lexical
..... extension:linePaymentAllocation SC 0..1 (Complex) Bốn nguồn thanh toán — cột 10 đến 13
URL: http://fhir.hl7.org.vn/core/StructureDefinition/vn-ext-line-payment-allocation
Constraints: vn-line-payment-allocation-vnd, vn-line-payment-allocation-nonnegative
.... modifierExtension ?!Σ 0..* Extension Extensions that cannot be ignored even if unrecognized
.... sequence S 1..1 positiveInt Sequence number of line item
.... chargeItem[x] S 1..1 Mã dịch vụ, thuốc hoặc vật tư của dòng; dùng Reference(ChargeItem) khi hệ thống đã có ChargeItem
..... chargeItemReference Reference(ChargeItem)
..... chargeItemCodeableConcept CodeableConcept
.... Slices for priceComponent S 1..* BackboneElement Thành phần giá của dòng; lát `base` mang số lượng và thành tiền bệnh viện
Slice: Unordered, Open by value:type
..... priceComponent:All Slices Content/Rules for all slices
...... 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 S 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 Thành tiền của thành phần, VND
....... id 0..1 string Unique id for inter-element referencing
....... extension 0..* Extension Additional content defined by implementations
Slice: Unordered, Open by value:url
....... value Σ 0..1 decimal Numerical value (with implicit precision)
....... currency Σ 1..1 code ISO 4217 Currency Code
Binding: Currencies (required): A code indicating the currency, taken from ISO 4217.
Fixed Value: VND
..... priceComponent:base S 1..1 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 S 1..1 code base | surcharge | deduction | discount | tax | informational
Binding: InvoicePriceComponentType (required): Codes indicating the kind of the price component.
Fixed Value: base
...... code 0..1 CodeableConcept Code identifying the specific component
...... factor S 0..1 decimal Số lượng của dòng — cột (3) của mẫu; trống ở nhánh người bệnh tự túc phương tiện
...... amount S 0..1 Money Thành tiền bệnh viện — cột (7) của mẫu; trống ở nhánh người bệnh tự túc phương tiện
....... id 0..1 string Unique id for inter-element referencing
....... extension 0..* Extension Additional content defined by implementations
Slice: Unordered, Open by value:url
....... value SΣ 1..1 decimal Numerical value (with implicit precision)
....... currency Σ 1..1 code ISO 4217 Currency Code
Binding: Currencies (required): A code indicating the currency, taken from ISO 4217.
Fixed Value: VND
... totalPriceComponent 0..* See priceComponent (Invoice) Components of Invoice total
... totalNet SΣ 1..1 Money Tổng thành tiền bệnh viện của cả đợt khám
.... id 0..1 string Unique id for inter-element referencing
.... extension 0..* Extension Additional content defined by implementations
Slice: Unordered, Open by value:url
.... value Σ 0..1 decimal Numerical value (with implicit precision)
.... currency Σ 1..1 code ISO 4217 Currency Code
Binding: Currencies (required): A code indicating the currency, taken from ISO 4217.
Fixed Value: VND
... totalGross SΣ 0..1 Money Tổng sau các khoản cộng thêm, nếu có
... paymentTerms 0..1 markdown Payment details
... note 0..* Annotation Comments made about the invoice

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.identifier:MALK.​use Base required IdentifierUse 📍4.0.1 FHIR Std.
Invoice.identifier:MALK.​type Base extensible IdentifierType 📍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.
Invoice.lineItem.priceComponent.​amount.currency Base required CurrencyCode 📍4.0.1 FHIR Std.
Invoice.lineItem.priceComponent:base.​type Base required InvoicePriceComponentType 📍4.0.1 FHIR Std.
Invoice.lineItem.priceComponent:base.​amount.currency Base required CurrencyCode 📍4.0.1 FHIR Std.
Invoice.totalNet.currency Base required CurrencyCode 📍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()
vn-cost-calculation-exemption-needs-cap error Invoice.lineItem.extension:calculation Chỉ khai miễn trần khi dòng đang áp một quy tắc trần. A cap exemption SHALL NOT be declared on a line with no cap rule. extension.where(url = 'exemption').empty() or extension.where(url = 'capRule').value.ofType(CodeableConcept).coding.where(system = 'http://fhir.hl7.org.vn/core/CodeSystem/vn-cost-calculation-axis-cs' and code = 'no-cap').empty()
vn-cost-calculation-stent-ordinal error Invoice.lineItem.extension:calculation Dòng stent bổ sung phải khai thứ tự trong khoảng 2-4. An additional-stent line SHALL declare an ordinal between 2 and 4. extension.where(url = 'lineRole').value.ofType(CodeableConcept).coding.where(system = 'http://fhir.hl7.org.vn/core/CodeSystem/vn-cost-calculation-axis-cs' and code = 'additional-stent').empty() or extension.where(url = 'ordinal').value.ofType(positiveInt).where($this >= 2 and $this <= 4).exists()
vn-cost-calculation-transport-basis-coherent error Invoice.lineItem.extension:calculation Cơ sở tính vận chuyển và vai trò dòng vận chuyển phải đi cùng nhau. A transport calculation basis and the patient-transport line role SHALL be used together. extension.where(url = 'calculationBasis').value.ofType(CodeableConcept).coding.where(system = 'http://fhir.hl7.org.vn/core/CodeSystem/vn-cost-calculation-axis-cs' and (code = 'transport-kilometre' or code = 'transport-fuel' or code = 'transport-actual-one-way')).exists() = extension.where(url = 'lineRole').value.ofType(CodeableConcept).coding.where(system = 'http://fhir.hl7.org.vn/core/CodeSystem/vn-cost-calculation-axis-cs' and code = 'patient-transport').exists()
vn-cost-statement-issued-allocation-complete error Invoice Bảng kê đã phát hành hoặc đã cân đối thì mọi dòng phải có phân bổ bốn nguồn thanh toán (cột 10–13). An issued or balanced statement SHALL allocate every line across the four payment sources. status.where($this = 'issued' or $this = 'balanced').empty() or lineItem.all(extension.where(url = 'http://fhir.hl7.org.vn/core/StructureDefinition/vn-ext-line-payment-allocation').exists())
vn-cost-statement-line-allocation-sum error Invoice.lineItem Thành tiền của dòng phải bằng tổng bốn nguồn thanh toán: quỹ BHYT, người bệnh cùng trả, nguồn khác và người bệnh tự trả. Dòng người bệnh tự túc phương tiện vận chuyển đối chiếu với cột (9) vì không có cột (7). The line amount SHALL equal the sum of the four payment sources; a patient-arranged transport line is checked against column 9 because it has no column 7. extension.where(url = 'http://fhir.hl7.org.vn/core/StructureDefinition/vn-ext-line-payment-allocation').exists() implies (extension.where(url = 'http://fhir.hl7.org.vn/core/StructureDefinition/vn-ext-cost-calculation-context').extension.where(url = 'calculationBasis').value.ofType(CodeableConcept).coding.where(system = 'http://fhir.hl7.org.vn/core/CodeSystem/vn-cost-calculation-axis-cs' and code = 'transport-actual-one-way').exists().not() implies priceComponent.where(type = 'base').amount.value = extension.where(url = 'http://fhir.hl7.org.vn/core/StructureDefinition/vn-ext-line-payment-allocation').extension.value.ofType(Money).value.aggregate($total + $this, 0)) and (extension.where(url = 'http://fhir.hl7.org.vn/core/StructureDefinition/vn-ext-cost-calculation-context').extension.where(url = 'calculationBasis').value.ofType(CodeableConcept).coding.where(system = 'http://fhir.hl7.org.vn/core/CodeSystem/vn-cost-calculation-axis-cs' and code = 'transport-actual-one-way').exists() implies extension.where(url = 'http://fhir.hl7.org.vn/core/StructureDefinition/vn-ext-insurance-cost-info').extension.where(url = 'insuranceLineAmount').value.ofType(Money).value = extension.where(url = 'http://fhir.hl7.org.vn/core/StructureDefinition/vn-ext-line-payment-allocation').extension.value.ofType(Money).value.aggregate($total + $this, 0))
vn-cost-statement-line-quantity-amount-required error Invoice Dòng chi phí phải có số lượng và thành tiền bệnh viện, trừ nhánh người bệnh tự túc phương tiện vận chuyển. A cost line SHALL carry quantity and hospital amount unless it is a patient-arranged transport line. lineItem.all(extension.where(url = 'http://fhir.hl7.org.vn/core/StructureDefinition/vn-ext-cost-calculation-context').extension.where(url = 'calculationBasis').value.ofType(CodeableConcept).coding.where(system = 'http://fhir.hl7.org.vn/core/CodeSystem/vn-cost-calculation-axis-cs' and code = 'transport-actual-one-way').exists() or (priceComponent.where(type = 'base').factor.exists() and priceComponent.where(type = 'base').amount.value.exists()))
vn-cost-statement-line-segment-exists error Invoice Mỗi dòng chi phí phải trỏ về một phân đoạn có thật trên bảng kê. Every line SHALL reference an existing segment sequence. lineItem.extension.where(url = 'http://fhir.hl7.org.vn/core/StructureDefinition/vn-ext-cost-statement-line').extension.where(url = 'segmentSequence').value.ofType(positiveInt).all($this in %resource.extension.where(url = 'http://fhir.hl7.org.vn/core/StructureDefinition/vn-ext-cost-statement-segment').extension.where(url = 'sequence').value.ofType(positiveInt))
vn-cost-statement-line-unit-price-required error Invoice Dòng chi phí không trỏ ChargeItem phải tự khai đơn vị tính và đơn giá bệnh viện — cột (2) và (4) của mẫu QĐ 697/QĐ-BYT. A line without a ChargeItem reference SHALL carry unit and hospitalUnitPrice. lineItem.where(chargeItem.ofType(Reference).exists().not()).all(extension.where(url = 'http://fhir.hl7.org.vn/core/StructureDefinition/vn-ext-cost-statement-line').extension.where(url = 'unit').exists() and extension.where(url = 'http://fhir.hl7.org.vn/core/StructureDefinition/vn-ext-cost-statement-line').extension.where(url = 'hospitalUnitPrice').exists())
vn-cost-statement-money-vnd error Invoice Mọi giá trị tiền của bảng kê phải dùng VND. Every monetary value SHALL use VND. descendants().ofType(Money).all(currency = 'VND')
vn-cost-statement-package-component-category error Invoice Thiết bị thành phần chỉ khai trên dòng thuộc nhóm chi phí gói thiết bị y tế (mã 10). Package components SHALL only appear on lines in the medical-device package category. lineItem.all(extension.where(url = 'http://fhir.hl7.org.vn/core/StructureDefinition/vn-ext-cost-statement-line').all(extension.where(url = 'packageComponent').exists() implies extension.where(url = 'category').value.ofType(CodeableConcept).coding.where(system = 'http://fhir.hl7.org.vn/core/CodeSystem/vn-cost-category-cs' and code = '10').exists()))
vn-cost-statement-related-service-exists error Invoice Dòng gói thiết bị trỏ tới dịch vụ kỹ thuật nào thì dòng đó phải có thật trên bảng kê. A referenced technical-service line SHALL exist on the same statement. lineItem.extension.where(url = 'http://fhir.hl7.org.vn/core/StructureDefinition/vn-ext-cost-statement-line').extension.where(url = 'relatedServiceSequence').value.ofType(positiveInt).all($this in %resource.lineItem.sequence)
vn-cost-statement-segment-benefit-range error Invoice.extension:segment Mức hưởng của phân đoạn phải nằm trong khoảng 0–100. The segment benefit level SHALL be between 0 and 100. extension.where(url = 'benefitLevel').value.ofType(decimal).all($this >= 0 and $this <= 100)
vn-cost-statement-segment-sequence-unique error Invoice Mỗi sequence phân đoạn phải duy nhất trong bảng kê. Every segment sequence SHALL be unique within the cost statement. extension.where(url = 'http://fhir.hl7.org.vn/core/StructureDefinition/vn-ext-cost-statement-segment').extension.where(url = 'sequence').value.ofType(positiveInt).isDistinct()
vn-cost-statement-total-sum error Invoice Tổng bảng kê phải bằng tổng thành tiền của mọi dòng. The statement total SHALL equal the sum of all line amounts. totalNet.value.exists() implies totalNet.value = lineItem.priceComponent.where(type = 'base').amount.value.aggregate($total + $this, 0)
vn-cost-statement-transport-line-category error Invoice Dòng khai vai trò vận chuyển người bệnh phải thuộc nhóm chi phí vận chuyển (mã 11), và ngược lại. A patient-transport line role and the transport cost category SHALL agree. lineItem.all(extension.where(url = 'http://fhir.hl7.org.vn/core/StructureDefinition/vn-ext-cost-calculation-context').extension.where(url = 'lineRole').value.ofType(CodeableConcept).coding.where(system = 'http://fhir.hl7.org.vn/core/CodeSystem/vn-cost-calculation-axis-cs' and code = 'patient-transport').exists() = extension.where(url = 'http://fhir.hl7.org.vn/core/StructureDefinition/vn-ext-cost-statement-line').extension.where(url = 'category').value.ofType(CodeableConcept).coding.where(system = 'http://fhir.hl7.org.vn/core/CodeSystem/vn-cost-category-cs' and code = '11').exists())
vn-cost-statement-uninsured-line-defaults error Invoice Cột số (8) của dòng không có thẻ BHYT phải bằng 0 và cột số (13) phải bằng cột số (7). For every line owned by a segment without Coverage, column 8 SHALL be explicitly 0 and column 13 SHALL equal column 7. %resource.lineItem.where(extension.where(url = 'http://fhir.hl7.org.vn/core/StructureDefinition/vn-ext-cost-statement-line').extension.where(url = 'segmentSequence').value.ofType(positiveInt).intersect(%resource.extension.where(url = 'http://fhir.hl7.org.vn/core/StructureDefinition/vn-ext-cost-statement-segment').where(extension.where(url = 'coverage').empty()).extension.where(url = 'sequence').value.ofType(positiveInt)).exists()).all(extension.where(url = 'http://fhir.hl7.org.vn/core/StructureDefinition/vn-ext-insurance-cost-info').extension.where(url = 'paymentRatio').value.ofType(decimal) = 0 and extension.where(url = 'http://fhir.hl7.org.vn/core/StructureDefinition/vn-ext-line-payment-allocation').extension.where(url = 'patientSelfPay').value.ofType(Money).value = priceComponent.where(type = 'base').amount.value)
vn-cost-statement-uninsured-no-benefit error Invoice.extension:segment Phân đoạn không có thẻ BHYT thì không được khai mức hưởng. A segment without a Coverage SHALL NOT declare a benefit level. extension.where(url = 'coverage').empty() implies extension.where(url = 'benefitLevel').empty()
vn-insurance-cost-ratio-and-lexical error Invoice.lineItem.extension:insuranceCostInfo Các tỷ lệ phải nằm trong khoảng 0-100; chuỗi lexical gốc nếu có phải đi kèm paymentRatio; khoảng hiệu lực trần nếu có phải đi kèm paymentCeiling. Percentage values SHALL be within 0-100; a source lexical string SHALL accompany paymentRatio; a ceiling period SHALL accompany paymentCeiling. extension.where(url = 'paymentRatio').value.ofType(decimal).all($this >= 0 and $this <= 100) and extension.where(url = 'servicePaymentRatio').value.ofType(decimal).all($this >= 0 and $this <= 100) and extension.where(url = 'benefitLevel').value.ofType(decimal).all($this >= 0 and $this <= 100) and (extension.where(url = 'paymentRatioSourceLexical').empty() or extension.where(url = 'paymentRatio').exists()) and (extension.where(url = 'paymentCeilingPeriod').empty() or extension.where(url = 'paymentCeiling').exists())
vn-line-payment-allocation-nonnegative error Invoice.lineItem.extension:linePaymentAllocation Mọi khoản tiền phân bổ phải lớn hơn hoặc bằng 0. Every allocated Money value SHALL be greater than or equal to zero. extension.value.ofType(Money).all(value >= 0)
vn-line-payment-allocation-vnd error Invoice.lineItem.extension:linePaymentAllocation Mọi khoản tiền phân bổ phải dùng VND. Every allocated Money value SHALL use VND. extension.value.ofType(Money).all(currency = 'VND')

 

Biểu diễn khác của hồ sơ: CSV, Excel, Schematron