Skip to content

Commit 04cf4b9

Browse files
✨ add support for financial document v1.14, US healthcare cards v1.3 & invoice v4.11 (#241)
1 parent d2d4069 commit 04cf4b9

File tree

18 files changed

+175
-66
lines changed

18 files changed

+175
-66
lines changed

docs/energy_bill_fra_v1.md

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -60,58 +60,58 @@ public class SimpleMindeeClient {
6060
########
6161
Document
6262
########
63-
:Mindee ID: 17f0ccef-e3fe-4a28-838d-d704489d6ce7
63+
:Mindee ID: ff1f2ca8-4d29-44d8-a564-599a982a4ef7
6464
:Filename: default_sample.pdf
6565
6666
Inference
6767
#########
68-
:Product: mindee/energy_bill_fra v1.0
69-
:Rotation applied: No
68+
:Product: mindee/energy_bill_fra v1.2
69+
:Rotation applied: Yes
7070
7171
Prediction
7272
==========
73-
:Invoice Number: 10123590373
74-
:Contract ID: 1234567890
73+
:Invoice Number: 1234567890
74+
:Contract ID: 9876543210
7575
:Delivery Point: 98765432109876
7676
:Invoice Date: 2021-01-29
7777
:Due Date: 2021-02-15
7878
:Total Before Taxes: 1241.03
7979
:Total Taxes: 238.82
8080
:Total Amount: 1479.85
8181
:Energy Supplier:
82-
:Address: TSA 12345, 12345 DEMOCITY CEDEX, 75001 PARIS
82+
:Address: TSA 12345, 12345 DEMOCITY CEDEX
8383
:Name: EDF
8484
:Energy Consumer:
85-
:Address: 12 AVENUE DES RÊVES, RDC A 123 COUR FAUSSE A, 75000 PARIS
86-
:Name: John Doe
85+
:Address: 123 RUE DE L'IMAGINAIRE, 75001 PARIS
86+
:Name: JOHN DOE
8787
:Subscription:
8888
+--------------------------------------+------------+------------+----------+-----------+------------+
8989
| Description | End Date | Start Date | Tax Rate | Total | Unit Price |
9090
+======================================+============+============+==========+===========+============+
9191
| Abonnement électricité | 2021-02-28 | 2021-01-01 | 5.50 | 59.00 | 29.50 |
9292
+--------------------------------------+------------+------------+----------+-----------+------------+
9393
:Energy Usage:
94-
+--------------------------------------+------------+------------+----------+-----------+------------+
95-
| Description | End Date | Start Date | Tax Rate | Total | Unit Price |
96-
+======================================+============+============+==========+===========+============+
97-
| Consommation (HT) | 2021-01-27 | 2020-11-28 | 20.00 | 898.43 | 10.47 |
98-
+--------------------------------------+------------+------------+----------+-----------+------------+
94+
+-------------+--------------------------------------+------------+------------+----------+-----------+-----------------+------------+
95+
| Consumption | Description | End Date | Start Date | Tax Rate | Total | Unit of Measure | Unit Price |
96+
+=============+======================================+============+============+==========+===========+=================+============+
97+
| 8581.00 | Consommation électricité | 2021-01-27 | 2020-11-28 | 20.00 | 898.43 | kWh | 0.1047 |
98+
+-------------+--------------------------------------+------------+------------+----------+-----------+-----------------+------------+
9999
:Taxes and Contributions:
100100
+--------------------------------------+------------+------------+----------+-----------+------------+
101101
| Description | End Date | Start Date | Tax Rate | Total | Unit Price |
102102
+======================================+============+============+==========+===========+============+
103-
| Contribution au Service Public de... | 2021-01-27 | 2020-11-28 | 20.00 | 193.07 | 2.25 |
103+
| Contribution au Service Public de... | 2021-01-27 | 2020-11-28 | 20.00 | 193.07 | 0.0225 |
104104
+--------------------------------------+------------+------------+----------+-----------+------------+
105-
| Départementale sur la Conso Final... | 2020-12-31 | 2020-11-28 | 20.00 | 13.98 | 0.3315 |
105+
| Taxe Départementale sur la Conso ... | 2021-01-27 | 2020-11-28 | 20.00 | 13.98 | 0.003315 |
106106
+--------------------------------------+------------+------------+----------+-----------+------------+
107-
| Communale sur la Conso Finale Ele... | 2021-01-27 | 2021-01-01 | 20.00 | 28.56 | 0.6545 |
107+
| Taxe Communale sur la Conso Final... | 2021-01-27 | 2020-11-28 | 20.00 | 28.56 | 0.006545 |
108108
+--------------------------------------+------------+------------+----------+-----------+------------+
109-
| Contribution Tarifaire d'Achemine... | 2020-12-31 | 2020-11-28 | 20.00 | 27.96 | 0.663 |
109+
| Taxe Communale sur la Conso Final... | 2021-01-27 | 2020-11-28 | 20.00 | 27.96 | 0.00663 |
110110
+--------------------------------------+------------+------------+----------+-----------+------------+
111111
:Meter Details:
112112
:Meter Number: 620
113113
:Meter Type: electricity
114-
:Unit of Measure: kWh
114+
:Unit of Power: 36kVA
115115
```
116116

117117
# Field Types

docs/expense_receipts_v5.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -279,6 +279,9 @@ The following fields are extracted for Receipt V5:
279279
- 'gasoline'
280280
- 'telecom'
281281
- 'miscellaneous'
282+
- 'software'
283+
- 'shopping'
284+
- 'energy'
282285

283286
```java
284287
System.out.println(result.getDocument().getInference().getPrediction().getCategory().value);
@@ -335,6 +338,15 @@ System.out.println(result.getDocument().getInference().getPrediction().getReceip
335338
- 'train'
336339
- 'restaurant'
337340
- 'shopping'
341+
- 'other'
342+
- 'groceries'
343+
- 'cultural'
344+
- 'electronics'
345+
- 'office_supplies'
346+
- 'micromobility'
347+
- 'car_rental'
348+
- 'public'
349+
- 'delivery'
338350
- null
339351

340352
```java

docs/financial_document_v1.md

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -107,12 +107,12 @@ public class SimpleMindeeClient {
107107
########
108108
Document
109109
########
110-
:Mindee ID: a80ac0ee-26f6-4e2e-988a-960b240d5ba7
110+
:Mindee ID: f52333ab-811e-4647-993e-ad79e072afa3
111111
:Filename: default_sample.jpg
112112
113113
Inference
114114
#########
115-
:Product: mindee/financial_document v1.11
115+
:Product: mindee/financial_document v1.12
116116
:Rotation applied: Yes
117117
118118
Prediction
@@ -148,6 +148,7 @@ Prediction
148148
:Shipping Address: 2019 Redbud Drive New York, NY 10011
149149
:Billing Address: 4312 Wood Road New York, NY 10031
150150
:Document Type: INVOICE
151+
:Document Type Extended: INVOICE
151152
:Purchase Subcategory:
152153
:Purchase Category: miscellaneous
153154
:Total Tax: 9.75
@@ -200,6 +201,7 @@ Page 0
200201
:Shipping Address: 2019 Redbud Drive New York, NY 10011
201202
:Billing Address: 4312 Wood Road New York, NY 10031
202203
:Document Type: INVOICE
204+
:Document Type Extended: INVOICE
203205
:Purchase Subcategory:
204206
:Purchase Category: miscellaneous
205207
:Total Tax: 9.75
@@ -315,7 +317,7 @@ System.out.println(result.getDocument().getInference().getPrediction().getBillin
315317
```
316318

317319
## Purchase Category
318-
**category**: The purchase category, only for receipts.
320+
**category**: The purchase category.
319321

320322
#### Possible values include:
321323
- 'toll'
@@ -326,6 +328,9 @@ System.out.println(result.getDocument().getInference().getPrediction().getBillin
326328
- 'gasoline'
327329
- 'telecom'
328330
- 'miscellaneous'
331+
- 'software'
332+
- 'shopping'
333+
- 'energy'
329334

330335
```java
331336
System.out.println(result.getDocument().getInference().getPrediction().getCategory().value);
@@ -477,14 +482,23 @@ System.out.println(result.getDocument().getInference().getPrediction().getShippi
477482
```
478483

479484
## Purchase Subcategory
480-
**subcategory**: The purchase subcategory for transport and food, only for receipts.
485+
**subcategory**: The purchase subcategory for transport, food and shooping.
481486

482487
#### Possible values include:
483488
- 'plane'
484489
- 'taxi'
485490
- 'train'
486491
- 'restaurant'
487492
- 'shopping'
493+
- 'other'
494+
- 'groceries'
495+
- 'cultural'
496+
- 'electronics'
497+
- 'office_supplies'
498+
- 'micromobility'
499+
- 'car_rental'
500+
- 'public'
501+
- 'delivery'
488502
- null
489503

490504
```java

docs/ind_passport_v1.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ Document
6565
6666
Inference
6767
#########
68-
:Product: mindee/ind_passport v1.0
68+
:Product: mindee/ind_passport v1.2
6969
:Rotation applied: Yes
7070
7171
Prediction
@@ -88,10 +88,10 @@ Prediction
8888
:Name of Mother:
8989
:Old Passport Date of Issue:
9090
:Old Passport Number:
91+
:Old Passport Place of Issue:
9192
:Address Line 1:
9293
:Address Line 2:
9394
:Address Line 3:
94-
:Old Passport Place of Issue:
9595
:File Number:
9696
```
9797

docs/invoices_v4.md

Lines changed: 47 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,12 +107,12 @@ public class SimpleMindeeClient {
107107
########
108108
Document
109109
########
110-
:Mindee ID: b55db8f9-ae3b-4f05-b2f1-ec0ced5e5b70
110+
:Mindee ID: 3e524d26-f7dc-4852-9bbf-833a127a9570
111111
:Filename: default_sample.jpg
112112
113113
Inference
114114
#########
115-
:Product: mindee/invoices v4.9
115+
:Product: mindee/invoices v4.10
116116
:Rotation applied: Yes
117117
118118
Prediction
@@ -147,6 +147,7 @@ Prediction
147147
:Shipping Address:
148148
:Billing Address: 1954 Bloor Street West Toronto, ON, M6P 3K9 Canada
149149
:Document Type: INVOICE
150+
:Document Type Extended: INVOICE
150151
:Line Items:
151152
+--------------------------------------+--------------+----------+------------+--------------+--------------+-----------------+------------+
152153
| Description | Product code | Quantity | Tax Amount | Tax Rate (%) | Total Amount | Unit of measure | Unit Price |
@@ -193,6 +194,7 @@ Page 0
193194
:Shipping Address:
194195
:Billing Address: 1954 Bloor Street West Toronto, ON, M6P 3K9 Canada
195196
:Document Type: INVOICE
197+
:Document Type Extended: INVOICE
196198
:Line Items:
197199
+--------------------------------------+--------------+----------+------------+--------------+--------------+-----------------+------------+
198200
| Description | Product code | Quantity | Tax Amount | Tax Rate (%) | Total Amount | Unit of measure | Unit Price |
@@ -302,6 +304,25 @@ The following fields are extracted for Invoice V4:
302304
System.out.println(result.getDocument().getInference().getPrediction().getBillingAddress().value);
303305
```
304306

307+
## Purchase Category
308+
**category**: The purchase category.
309+
310+
#### Possible values include:
311+
- 'toll'
312+
- 'food'
313+
- 'parking'
314+
- 'transport'
315+
- 'accommodation'
316+
- 'telecom'
317+
- 'miscellaneous'
318+
- 'software'
319+
- 'shopping'
320+
- 'energy'
321+
322+
```java
323+
System.out.println(result.getDocument().getInference().getPrediction().getCategory().value);
324+
```
325+
305326
## Customer Address
306327
**customerAddress**: The address of the customer.
307328

@@ -431,6 +452,30 @@ for (referenceNumbersElem : result.getDocument().getInference().getPrediction().
431452
System.out.println(result.getDocument().getInference().getPrediction().getShippingAddress().value);
432453
```
433454

455+
## Purchase Subcategory
456+
**subcategory**: The purchase subcategory for transport, food and shopping.
457+
458+
#### Possible values include:
459+
- 'plane'
460+
- 'taxi'
461+
- 'train'
462+
- 'restaurant'
463+
- 'shopping'
464+
- 'other'
465+
- 'groceries'
466+
- 'cultural'
467+
- 'electronics'
468+
- 'office_supplies'
469+
- 'micromobility'
470+
- 'car_rental'
471+
- 'public'
472+
- 'delivery'
473+
- null
474+
475+
```java
476+
System.out.println(result.getDocument().getInference().getPrediction().getSubcategory().value);
477+
```
478+
434479
## Supplier Address
435480
**supplierAddress**: The address of the supplier or merchant.
436481

docs/us_healthcare_cards_v1.md

Lines changed: 29 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -60,13 +60,13 @@ public class SimpleMindeeClient {
6060
########
6161
Document
6262
########
63-
:Mindee ID: 0ced9f49-00c0-4a1d-8221-4a1538813a95
63+
:Mindee ID: 1e71d5f0-dedb-4070-9d94-9207cd9570b5
6464
:Filename: default_sample.jpg
6565
6666
Inference
6767
#########
68-
:Product: mindee/us_healthcare_cards v1.0
69-
:Rotation applied: No
68+
:Product: mindee/us_healthcare_cards v1.2
69+
:Rotation applied: Yes
7070
7171
Prediction
7272
==========
@@ -81,21 +81,22 @@ Prediction
8181
:Group Number: 98765
8282
:Payer ID: 87726
8383
:RX BIN: 610279
84+
:RX ID:
8485
:RX GRP: UHEALTH
8586
:RX PCN: 9999
8687
:copays:
87-
+--------------+--------------+
88-
| Service Fees | Service Name |
89-
+==============+==============+
90-
| 20.00 | office visit |
91-
+--------------+--------------+
92-
| 300.00 | emergency |
93-
+--------------+--------------+
94-
| 75.00 | urgent care |
95-
+--------------+--------------+
96-
| 30.00 | specialist |
97-
+--------------+--------------+
98-
:Enrollment Date: 2023-09-13
88+
+--------------+----------------------+
89+
| Service Fees | Service Name |
90+
+==============+======================+
91+
| 300.00 | emergency_room |
92+
+--------------+----------------------+
93+
| 20.00 | office_visit |
94+
+--------------+----------------------+
95+
| 75.00 | urgent_care |
96+
+--------------+----------------------+
97+
| 30.00 | specialist |
98+
+--------------+----------------------+
99+
:Enrollment Date:
99100
```
100101

101102
# Field Types
@@ -129,13 +130,13 @@ The date field `DateField` extends `BaseField`, but also implements:
129130
## Specific Fields
130131
Fields which are specific to this product; they are not used in any other product.
131132

132-
### copays Field
133-
Is a fixed amount for a covered service.
133+
### Copays Field
134+
Copayments for covered services.
134135

135136
A `HealthcareCardV1Copay` implements the following attributes:
136137

137-
* **serviceFees** (`Double`): The price of service.
138-
* **serviceName** (`String`): The name of service of the copay.
138+
* **serviceFees** (`Double`): The price of the service.
139+
* **serviceName** (`String`): The name of the service.
139140

140141
#### Possible values include:
141142
- primary_care
@@ -156,8 +157,8 @@ The following fields are extracted for Healthcare Card V1:
156157
System.out.println(result.getDocument().getInference().getPrediction().getCompanyName().value);
157158
```
158159

159-
## copays
160-
**copays**(List<[HealthcareCardV1Copay](#copays-field)>): Is a fixed amount for a covered service.
160+
## Copays
161+
**copays**(List<[HealthcareCardV1Copay](#copays-field)>): Copayments for covered services.
161162

162163
```java
163164
for (copaysElem : result.getDocument().getInference().getPrediction().getCopays())
@@ -218,6 +219,13 @@ System.out.println(result.getDocument().getInference().getPrediction().getMember
218219
System.out.println(result.getDocument().getInference().getPrediction().getPayerId().value);
219220
```
220221

222+
## Plan Name
223+
**planName**: The name of the healthcare plan.
224+
225+
```java
226+
System.out.println(result.getDocument().getInference().getPrediction().getPlanName().value);
227+
```
228+
221229
## RX BIN
222230
**rxBin**: The BIN number for prescription drug coverage.
223231

0 commit comments

Comments
 (0)