nexus-payment-amounts-positive |
this profile |
error |
PaymentReconciliation |
paymentAmount and every detail amount SHALL be greater than zero; a refund is positive and typed refund
paymentAmount.value > 0 and detail.all(amount.value > 0) |
nexus-payment-detail-kind |
this profile |
error |
PaymentReconciliation |
Every detail SHALL be typed either payment (HL7 payment-type) or refund (Nexus payment-type)
detail.all(type.coding.where((system = 'http://terminology.hl7.org/CodeSystem/payment-type' and code = 'payment') or (system = 'https://fhir.apps.health/CodeSystem/nexus-payment-type' and code = 'refund')).exists()) |
nexus-payment-detail-names-invoice |
this profile |
error |
PaymentReconciliation |
Every detail SHALL name the invoice it settles by a billing-vendor invoice identifier
detail.all(request.identifier.where(system = 'https://fhir.apps.health/NamingSystem/nexus-clinicaid-invoice-uuid' and value.exists()).exists()) |
nexus-payment-invoices-indexed |
this profile |
error |
PaymentReconciliation |
Every invoice a detail names SHALL also appear in identifier under the same system, so a search by invoice finds the reconciliation
detail.request.identifier.where(system = 'https://fhir.apps.health/NamingSystem/nexus-clinicaid-invoice-uuid').value.all($this in %resource.identifier.where(system = 'https://fhir.apps.health/NamingSystem/nexus-clinicaid-invoice-uuid').value) |
nexus-payment-one-direction |
this profile |
error |
PaymentReconciliation |
A reconciliation SHALL be all payment or all refund, never a mix
detail.where(type.coding.where(system = 'https://fhir.apps.health/CodeSystem/nexus-payment-type' and code = 'refund').exists()).empty() or detail.all(type.coding.where(system = 'https://fhir.apps.health/CodeSystem/nexus-payment-type' and code = 'refund').exists()) |
nexus-payment-refund-has-reason |
this profile |
error |
PaymentReconciliation |
A refund SHALL carry the payment-reason extension
detail.type.coding.where(system = 'https://fhir.apps.health/CodeSystem/nexus-payment-type' and code = 'refund').exists() implies extension('https://fhir.apps.health/StructureDefinition/nexus-payment-reason').exists() |
nexus-payment-reversal-has-reason |
this profile |
error |
PaymentReconciliation |
A cancelled (reversed) reconciliation SHALL carry the payment-reason extension
status = 'cancelled' implies extension('https://fhir.apps.health/StructureDefinition/nexus-payment-reason').exists() |
dom-2 |
inherited |
error |
PaymentReconciliation |
If the resource is contained in another resource, it SHALL NOT contain nested Resources
contained.contained.empty() |
dom-3 |
inherited |
error |
PaymentReconciliation |
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 |
dom-4 |
inherited |
error |
PaymentReconciliation |
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 |
inherited |
error |
PaymentReconciliation |
If a resource is contained in another resource, it SHALL NOT have a security label
contained.meta.security.empty() |
dom-6 |
inherited |
warning |
PaymentReconciliation |
A resource should have narrative for robust management
text.div.exists() |
ele-1 |
inherited |
error |
PaymentReconciliation.meta |
All FHIR elements must have a @value or children
hasValue() or (children().count() > id.count()) |
ext-1 |
inherited |
error |
PaymentReconciliation.extension |
Must have either extensions or value[x], not both
extension.exists() != value.exists() |