> For the complete documentation index, see [llms.txt](https://icure.gitbook.io/icure/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://icure.gitbook.io/icure/icure-data-stack/icure-data-model/other-models/invoice.md).

# Invoice

This entity is a root level object. It represents an Invoice. It is serialized in JSON and saved in the underlying iCure CouchDB database.

## Properties

| Property                         | Type                                                                                                                                                                      | Description                                                                                                                                                                                                                                                                                                                                                                                   |
| -------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `id *`                           | [String](https://github.com/icure-io/icure-tech-docs/blob/master/icure-data-stack/icure-data-model/other-models/invoice/String/README.md)                                 | The Id of the Invoice. We encourage using either a v4 UUID or a HL7 Id.                                                                                                                                                                                                                                                                                                                       |
| `rev`                            | [String](https://github.com/icure-io/icure-tech-docs/blob/master/icure-data-stack/icure-data-model/other-models/invoice/String/README.md)                                 | The revision of the invoice in the database, used for conflict management / optimistic locking.                                                                                                                                                                                                                                                                                               |
| `created`                        | [Long](https://github.com/icure-io/icure-tech-docs/blob/master/icure-data-stack/icure-data-model/other-models/invoice/Long/README.md)                                     | The timestamp (unix epoch in ms) of creation of this entity, will be filled automatically if missing. Not enforced by the application server. format: int64.                                                                                                                                                                                                                                  |
| `modified`                       | [Long](https://github.com/icure-io/icure-tech-docs/blob/master/icure-data-stack/icure-data-model/other-models/invoice/Long/README.md)                                     | The date (unix epoch in ms) of the latest modification of this entity, will be filled automatically if missing. Not enforced by the application server. format: int64.                                                                                                                                                                                                                        |
| `author`                         | [String](https://github.com/icure-io/icure-tech-docs/blob/master/icure-data-stack/icure-data-model/other-models/invoice/String/README.md)                                 | The id of the User that has created this entity, will be filled automatically if missing. Not enforced by the application server.                                                                                                                                                                                                                                                             |
| `responsible`                    | [String](https://github.com/icure-io/icure-tech-docs/blob/master/icure-data-stack/icure-data-model/other-models/invoice/String/README.md)                                 | The id of the HealthcareParty that is responsible for this entity, will be filled automatically if missing. Not enforced by the application server.                                                                                                                                                                                                                                           |
| `medicalLocationId`              | [String](https://github.com/icure-io/icure-tech-docs/blob/master/icure-data-stack/icure-data-model/other-models/invoice/String/README.md)                                 | The id of the medical location where this entity was created.                                                                                                                                                                                                                                                                                                                                 |
| `tags *`                         | [List](https://github.com/icure-io/icure-tech-docs/blob/master/icure-data-stack/icure-data-model/other-models/invoice/CodeStub/README.md)                                 | A tag is an item from a codification system that qualifies an entity as being member of a certain class, whatever the value it might have taken. If the tag qualifies the content of a field, it means that whatever the content of the field, the tag will always apply. For example, the label of a field is qualified using a tag. LOINC is a codification system typically used for tags. |
| `codes *`                        | [List](https://github.com/icure-io/icure-tech-docs/blob/master/icure-data-stack/icure-data-model/other-models/invoice/CodeStub/README.md)                                 | A code is an item from a codification system that qualifies the content of this entity. SNOMED-CT, ICPC-2 or ICD-10 codifications systems can be used for codes                                                                                                                                                                                                                               |
| `endOfLife`                      | [Long](https://github.com/icure-io/icure-tech-docs/blob/master/icure-data-stack/icure-data-model/other-models/invoice/Long/README.md)                                     | Soft delete (unix epoch in ms) timestamp of the object. format: int64.                                                                                                                                                                                                                                                                                                                        |
| `deletionDate`                   | [Long](https://github.com/icure-io/icure-tech-docs/blob/master/icure-data-stack/icure-data-model/other-models/invoice/Long/README.md)                                     | hard delete (unix epoch in ms) timestamp of the object. Filled automatically when deletePatient is called. format: int64.                                                                                                                                                                                                                                                                     |
| `invoiceDate`                    | [Long](https://github.com/icure-io/icure-tech-docs/blob/master/icure-data-stack/icure-data-model/other-models/invoice/Long/README.md)                                     | The timestamp (unix epoch in ms) when the invoice was drafted, will be filled automatically if missing. Not enforced by the application server. format: int64.                                                                                                                                                                                                                                |
| `sentDate`                       | [Long](https://github.com/icure-io/icure-tech-docs/blob/master/icure-data-stack/icure-data-model/other-models/invoice/Long/README.md)                                     | The timestamp (unix epoch in ms) when the invoice was sent, will be filled automatically if missing. Not enforced by the application server. format: int64.                                                                                                                                                                                                                                   |
| `printedDate`                    | [Long](https://github.com/icure-io/icure-tech-docs/blob/master/icure-data-stack/icure-data-model/other-models/invoice/Long/README.md)                                     | The timestamp (unix epoch in ms) when the invoice is printed, will be filled automatically if missing. Not enforced by the application server. format: int64.                                                                                                                                                                                                                                 |
| `invoicingCodes *`               | [List](https://github.com/icure-io/icure-tech-docs/blob/master/icure-data-stack/icure-data-model/other-models/invoice/InvoicingCode/README.md)                            |                                                                                                                                                                                                                                                                                                                                                                                               |
| `receipts *`                     | [Map](https://github.com/icure-io/icure-tech-docs/blob/master/icure-data-stack/icure-data-model/other-models/invoice/String/README.md)                                    |                                                                                                                                                                                                                                                                                                                                                                                               |
| `recipientType`                  | [String](https://github.com/icure-io/icure-tech-docs/blob/master/icure-data-stack/icure-data-model/other-models/invoice/String/README.md)                                 | The type of user that receives the invoice, a patient or a healthcare party                                                                                                                                                                                                                                                                                                                   |
| `recipientId`                    | [String](https://github.com/icure-io/icure-tech-docs/blob/master/icure-data-stack/icure-data-model/other-models/invoice/String/README.md)                                 | Id of the recipient of the invoice. For healthcare party and insurance, patient link happens through secretForeignKeys                                                                                                                                                                                                                                                                        |
| `invoiceReference`               | [String](https://github.com/icure-io/icure-tech-docs/blob/master/icure-data-stack/icure-data-model/other-models/invoice/String/README.md)                                 |                                                                                                                                                                                                                                                                                                                                                                                               |
| `thirdPartyReference`            | [String](https://github.com/icure-io/icure-tech-docs/blob/master/icure-data-stack/icure-data-model/other-models/invoice/String/README.md)                                 |                                                                                                                                                                                                                                                                                                                                                                                               |
| `thirdPartyPaymentJustification` | [String](https://github.com/icure-io/icure-tech-docs/blob/master/icure-data-stack/icure-data-model/other-models/invoice/String/README.md)                                 |                                                                                                                                                                                                                                                                                                                                                                                               |
| `thirdPartyPaymentReason`        | [String](https://github.com/icure-io/icure-tech-docs/blob/master/icure-data-stack/icure-data-model/other-models/invoice/String/README.md)                                 |                                                                                                                                                                                                                                                                                                                                                                                               |
| `reason`                         | [String](https://github.com/icure-io/icure-tech-docs/blob/master/icure-data-stack/icure-data-model/other-models/invoice/String/README.md)                                 |                                                                                                                                                                                                                                                                                                                                                                                               |
| `invoiceType`                    | [String](https://github.com/icure-io/icure-tech-docs/blob/master/icure-data-stack/icure-data-model/other-models/invoice/String/README.md)                                 | The format the invoice should follow based on the recipient which could be a patient, mutual fund or paying agency such as the CPAS Values: patient, mutualfund, payingagency, insurance, efact, other                                                                                                                                                                                        |
| `sentMediumType`                 | [String](https://github.com/icure-io/icure-tech-docs/blob/master/icure-data-stack/icure-data-model/other-models/invoice/String/README.md)                                 | Medium of the invoice: CD ROM, Email, paper, etc. Values: cdrom, eattest, efact, email, mediprima, paper                                                                                                                                                                                                                                                                                      |
| `interventionType`               | [String](https://github.com/icure-io/icure-tech-docs/blob/master/icure-data-stack/icure-data-model/other-models/invoice/String/README.md)                                 | Values: total, userfees                                                                                                                                                                                                                                                                                                                                                                       |
| `groupId`                        | [String](https://github.com/icure-io/icure-tech-docs/blob/master/icure-data-stack/icure-data-model/other-models/invoice/String/README.md)                                 |                                                                                                                                                                                                                                                                                                                                                                                               |
| `paymentType`                    | [String](https://github.com/icure-io/icure-tech-docs/blob/master/icure-data-stack/icure-data-model/other-models/invoice/String/README.md)                                 | Type of payment, ex: cash, wired, insurance, debit card, etc. Values: cash, wired, insurance, creditcard, debitcard, paypal, bitcoin, other                                                                                                                                                                                                                                                   |
| `paid`                           | [Double](https://github.com/icure-io/icure-tech-docs/blob/master/icure-data-stack/icure-data-model/other-models/invoice/Double/README.md)                                 | format: double.                                                                                                                                                                                                                                                                                                                                                                               |
| `payments`                       | [List](https://github.com/icure-io/icure-tech-docs/blob/master/icure-data-stack/icure-data-model/other-models/invoice/Payment/README.md)                                  |                                                                                                                                                                                                                                                                                                                                                                                               |
| `gnotionNihii`                   | [String](https://github.com/icure-io/icure-tech-docs/blob/master/icure-data-stack/icure-data-model/other-models/invoice/String/README.md)                                 |                                                                                                                                                                                                                                                                                                                                                                                               |
| `gnotionSsin`                    | [String](https://github.com/icure-io/icure-tech-docs/blob/master/icure-data-stack/icure-data-model/other-models/invoice/String/README.md)                                 |                                                                                                                                                                                                                                                                                                                                                                                               |
| `gnotionLastName`                | [String](https://github.com/icure-io/icure-tech-docs/blob/master/icure-data-stack/icure-data-model/other-models/invoice/String/README.md)                                 |                                                                                                                                                                                                                                                                                                                                                                                               |
| `gnotionFirstName`               | [String](https://github.com/icure-io/icure-tech-docs/blob/master/icure-data-stack/icure-data-model/other-models/invoice/String/README.md)                                 |                                                                                                                                                                                                                                                                                                                                                                                               |
| `gnotionCdHcParty`               | [String](https://github.com/icure-io/icure-tech-docs/blob/master/icure-data-stack/icure-data-model/other-models/invoice/String/README.md)                                 |                                                                                                                                                                                                                                                                                                                                                                                               |
| `invoicePeriod`                  | [Integer](https://github.com/icure-io/icure-tech-docs/blob/master/icure-data-stack/icure-data-model/other-models/invoice/Integer/README.md)                               | format: int32.                                                                                                                                                                                                                                                                                                                                                                                |
| `careProviderType`               | [String](https://github.com/icure-io/icure-tech-docs/blob/master/icure-data-stack/icure-data-model/other-models/invoice/String/README.md)                                 |                                                                                                                                                                                                                                                                                                                                                                                               |
| `internshipNihii`                | [String](https://github.com/icure-io/icure-tech-docs/blob/master/icure-data-stack/icure-data-model/other-models/invoice/String/README.md)                                 |                                                                                                                                                                                                                                                                                                                                                                                               |
| `internshipSsin`                 | [String](https://github.com/icure-io/icure-tech-docs/blob/master/icure-data-stack/icure-data-model/other-models/invoice/String/README.md)                                 |                                                                                                                                                                                                                                                                                                                                                                                               |
| `internshipLastName`             | [String](https://github.com/icure-io/icure-tech-docs/blob/master/icure-data-stack/icure-data-model/other-models/invoice/String/README.md)                                 |                                                                                                                                                                                                                                                                                                                                                                                               |
| `internshipFirstName`            | [String](https://github.com/icure-io/icure-tech-docs/blob/master/icure-data-stack/icure-data-model/other-models/invoice/String/README.md)                                 |                                                                                                                                                                                                                                                                                                                                                                                               |
| `internshipCdHcParty`            | [String](https://github.com/icure-io/icure-tech-docs/blob/master/icure-data-stack/icure-data-model/other-models/invoice/String/README.md)                                 |                                                                                                                                                                                                                                                                                                                                                                                               |
| `internshipCbe`                  | [String](https://github.com/icure-io/icure-tech-docs/blob/master/icure-data-stack/icure-data-model/other-models/invoice/String/README.md)                                 |                                                                                                                                                                                                                                                                                                                                                                                               |
| `supervisorNihii`                | [String](https://github.com/icure-io/icure-tech-docs/blob/master/icure-data-stack/icure-data-model/other-models/invoice/String/README.md)                                 |                                                                                                                                                                                                                                                                                                                                                                                               |
| `supervisorSsin`                 | [String](https://github.com/icure-io/icure-tech-docs/blob/master/icure-data-stack/icure-data-model/other-models/invoice/String/README.md)                                 |                                                                                                                                                                                                                                                                                                                                                                                               |
| `supervisorLastName`             | [String](https://github.com/icure-io/icure-tech-docs/blob/master/icure-data-stack/icure-data-model/other-models/invoice/String/README.md)                                 |                                                                                                                                                                                                                                                                                                                                                                                               |
| `supervisorFirstName`            | [String](https://github.com/icure-io/icure-tech-docs/blob/master/icure-data-stack/icure-data-model/other-models/invoice/String/README.md)                                 |                                                                                                                                                                                                                                                                                                                                                                                               |
| `supervisorCdHcParty`            | [String](https://github.com/icure-io/icure-tech-docs/blob/master/icure-data-stack/icure-data-model/other-models/invoice/String/README.md)                                 |                                                                                                                                                                                                                                                                                                                                                                                               |
| `supervisorCbe`                  | [String](https://github.com/icure-io/icure-tech-docs/blob/master/icure-data-stack/icure-data-model/other-models/invoice/String/README.md)                                 |                                                                                                                                                                                                                                                                                                                                                                                               |
| `error`                          | [String](https://github.com/icure-io/icure-tech-docs/blob/master/icure-data-stack/icure-data-model/other-models/invoice/String/README.md)                                 |                                                                                                                                                                                                                                                                                                                                                                                               |
| `encounterLocationName`          | [String](https://github.com/icure-io/icure-tech-docs/blob/master/icure-data-stack/icure-data-model/other-models/invoice/String/README.md)                                 |                                                                                                                                                                                                                                                                                                                                                                                               |
| `encounterLocationNihii`         | [String](https://github.com/icure-io/icure-tech-docs/blob/master/icure-data-stack/icure-data-model/other-models/invoice/String/README.md)                                 |                                                                                                                                                                                                                                                                                                                                                                                               |
| `encounterLocationNorm`          | [Integer](https://github.com/icure-io/icure-tech-docs/blob/master/icure-data-stack/icure-data-model/other-models/invoice/Integer/README.md)                               | format: int32.                                                                                                                                                                                                                                                                                                                                                                                |
| `longDelayJustification`         | [Integer](https://github.com/icure-io/icure-tech-docs/blob/master/icure-data-stack/icure-data-model/other-models/invoice/Integer/README.md)                               | format: int32.                                                                                                                                                                                                                                                                                                                                                                                |
| `correctiveInvoiceId`            | [String](https://github.com/icure-io/icure-tech-docs/blob/master/icure-data-stack/icure-data-model/other-models/invoice/String/README.md)                                 |                                                                                                                                                                                                                                                                                                                                                                                               |
| `correctedInvoiceId`             | [String](https://github.com/icure-io/icure-tech-docs/blob/master/icure-data-stack/icure-data-model/other-models/invoice/String/README.md)                                 |                                                                                                                                                                                                                                                                                                                                                                                               |
| `creditNote`                     | [Boolean](https://github.com/icure-io/icure-tech-docs/blob/master/icure-data-stack/icure-data-model/other-models/invoice/Boolean/README.md)                               |                                                                                                                                                                                                                                                                                                                                                                                               |
| `creditNoteRelatedInvoiceId`     | [String](https://github.com/icure-io/icure-tech-docs/blob/master/icure-data-stack/icure-data-model/other-models/invoice/String/README.md)                                 |                                                                                                                                                                                                                                                                                                                                                                                               |
| `idDocument`                     | [IdentityDocumentReader](https://github.com/icure-io/icure-tech-docs/blob/master/icure-data-stack/icure-data-model/other-models/invoice/IdentityDocumentReader/README.md) |                                                                                                                                                                                                                                                                                                                                                                                               |
| `cancelReason`                   | [String](https://github.com/icure-io/icure-tech-docs/blob/master/icure-data-stack/icure-data-model/other-models/invoice/String/README.md)                                 |                                                                                                                                                                                                                                                                                                                                                                                               |
| `cancelDate`                     | [Long](https://github.com/icure-io/icure-tech-docs/blob/master/icure-data-stack/icure-data-model/other-models/invoice/Long/README.md)                                     | format: int64.                                                                                                                                                                                                                                                                                                                                                                                |
| `options *`                      | [Map](https://github.com/icure-io/icure-tech-docs/blob/master/icure-data-stack/icure-data-model/other-models/invoice/String/README.md)                                    |                                                                                                                                                                                                                                                                                                                                                                                               |
| `secretForeignKeys *`            | [List](https://github.com/icure-io/icure-tech-docs/blob/master/icure-data-stack/icure-data-model/other-models/invoice/String/README.md)                                   | The secretForeignKeys are filled at the to many end of a one to many relationship (for example inside Contact for the Patient -> Contacts relationship). Used when we want to find all contacts for a specific patient. These keys are in clear. You can have several to partition the medical document space.                                                                                |
| `cryptedForeignKeys *`           | [Map](https://github.com/icure-io/icure-tech-docs/blob/master/icure-data-stack/icure-data-model/other-models/invoice/List/README.md)                                      | The secretForeignKeys are filled at the to many end of a one to many relationship (for example inside Contact for the Patient -> Contacts relationship). Used when we want to find the patient for a specific contact. These keys are the encrypted id (using the hcParty key for the delegate) that can be found in clear inside the patient. ids encrypted using the hcParty keys.          |
| `delegations *`                  | [Map](https://github.com/icure-io/icure-tech-docs/blob/master/icure-data-stack/icure-data-model/other-models/invoice/List/README.md)                                      | When a document is created, the responsible generates a cryptographically random master key (never to be used for something else than referencing from other entities). He/she encrypts it using his own AES exchange key and stores it as a delegation. The responsible is thus always in the delegations as well                                                                            |
| `encryptionKeys *`               | [Map](https://github.com/icure-io/icure-tech-docs/blob/master/icure-data-stack/icure-data-model/other-models/invoice/List/README.md)                                      | When a document needs to be encrypted, the responsible generates a cryptographically random master key (different from the delegation key, never to appear in clear anywhere in the db. He/she encrypts it using his own AES exchange key and stores it as a delegation                                                                                                                       |
| `encryptedSelf`                  | [String](https://github.com/icure-io/icure-tech-docs/blob/master/icure-data-stack/icure-data-model/other-models/invoice/String/README.md)                                 | The base64 encoded data of this object, formatted as JSON and encrypted in AES using the random master key from encryptionKeys.                                                                                                                                                                                                                                                               |
