Skip to content

Commit f14be02

Browse files
✨ add support for full address fields + upgrade products
1 parent 634ab53 commit f14be02

18 files changed

+183
-102
lines changed

docs/extras/guide/delivery_notes_v1.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ The text field `StringField` only has one constraint: its **value** is an `Optio
9595
The following fields are extracted for Delivery note V1:
9696

9797
## Customer Address
98-
**customer_address** ([StringField](#stringfield)): The address of the customer receiving the goods.
98+
**customer_address** ([AddressField](#addressfield)): The address of the customer receiving the goods.
9999

100100
```py
101101
print(result.document.inference.prediction.customer_address.value)
@@ -123,7 +123,7 @@ print(result.document.inference.prediction.delivery_number.value)
123123
```
124124

125125
## Supplier Address
126-
**supplier_address** ([StringField](#stringfield)): The address of the supplier providing the goods.
126+
**supplier_address** ([AddressField](#addressfield)): The address of the supplier providing the goods.
127127

128128
```py
129129
print(result.document.inference.prediction.supplier_address.value)

docs/extras/guide/expense_receipts_v5.md

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,6 +237,9 @@ The following fields are extracted for Receipt V5:
237237
- 'gasoline'
238238
- 'telecom'
239239
- 'miscellaneous'
240+
- 'software'
241+
- 'shopping'
242+
- 'energy'
240243

241244
```py
242245
print(result.document.inference.prediction.category.value)
@@ -291,14 +294,23 @@ print(result.document.inference.prediction.receipt_number.value)
291294
- 'train'
292295
- 'restaurant'
293296
- 'shopping'
297+
- 'other'
298+
- 'groceries'
299+
- 'cultural'
300+
- 'electronics'
301+
- 'office_supplies'
302+
- 'micromobility'
303+
- 'car_rental'
304+
- 'public'
305+
- 'delivery'
294306
- None
295307

296308
```py
297309
print(result.document.inference.prediction.subcategory.value)
298310
```
299311

300312
## Supplier Address
301-
**supplier_address** ([StringField](#stringfield)): The address of the supplier or merchant.
313+
**supplier_address** ([AddressField](#addressfield)): The address of the supplier or merchant.
302314

303315
```py
304316
print(result.document.inference.prediction.supplier_address.value)

docs/extras/guide/financial_document_v1.md

Lines changed: 20 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -70,12 +70,12 @@ print(result.document)
7070
########
7171
Document
7272
########
73-
:Mindee ID: f52333ab-811e-4647-993e-ad79e072afa3
73+
:Mindee ID: 6dd26385-719b-4527-bf6f-87d9da619de5
7474
:Filename: default_sample.jpg
7575
7676
Inference
7777
#########
78-
:Product: mindee/financial_document v1.12
78+
:Product: mindee/financial_document v1.14
7979
:Rotation applied: Yes
8080
8181
Prediction
@@ -276,14 +276,14 @@ A `FinancialDocumentV1LineItem` implements the following attributes:
276276
The following fields are extracted for Financial Document V1:
277277

278278
## Billing Address
279-
**billing_address** ([StringField](#stringfield)): The customer's address used for billing.
279+
**billing_address** ([AddressField](#addressfield)): The customer's address used for billing.
280280

281281
```py
282282
print(result.document.inference.prediction.billing_address.value)
283283
```
284284

285285
## Purchase Category
286-
**category** ([ClassificationField](#classificationfield)): The purchase category, only for receipts.
286+
**category** ([ClassificationField](#classificationfield)): The purchase category.
287287

288288
#### Possible values include:
289289
- 'toll'
@@ -294,13 +294,16 @@ print(result.document.inference.prediction.billing_address.value)
294294
- 'gasoline'
295295
- 'telecom'
296296
- 'miscellaneous'
297+
- 'software'
298+
- 'shopping'
299+
- 'energy'
297300

298301
```py
299302
print(result.document.inference.prediction.category.value)
300303
```
301304

302305
## Customer Address
303-
**customer_address** ([StringField](#stringfield)): The address of the customer.
306+
**customer_address** ([AddressField](#addressfield)): The address of the customer.
304307

305308
```py
306309
print(result.document.inference.prediction.customer_address.value)
@@ -432,29 +435,38 @@ for reference_numbers_elem in result.document.inference.prediction.reference_num
432435
```
433436

434437
## Shipping Address
435-
**shipping_address** ([StringField](#stringfield)): The customer's address used for shipping.
438+
**shipping_address** ([AddressField](#addressfield)): The customer's address used for shipping.
436439

437440
```py
438441
print(result.document.inference.prediction.shipping_address.value)
439442
```
440443

441444
## Purchase Subcategory
442-
**subcategory** ([ClassificationField](#classificationfield)): The purchase subcategory for transport and food, only for receipts.
445+
**subcategory** ([ClassificationField](#classificationfield)): The purchase subcategory for transport, food and shooping.
443446

444447
#### Possible values include:
445448
- 'plane'
446449
- 'taxi'
447450
- 'train'
448451
- 'restaurant'
449452
- 'shopping'
453+
- 'other'
454+
- 'groceries'
455+
- 'cultural'
456+
- 'electronics'
457+
- 'office_supplies'
458+
- 'micromobility'
459+
- 'car_rental'
460+
- 'public'
461+
- 'delivery'
450462
- None
451463

452464
```py
453465
print(result.document.inference.prediction.subcategory.value)
454466
```
455467

456468
## Supplier Address
457-
**supplier_address** ([StringField](#stringfield)): The address of the supplier or merchant.
469+
**supplier_address** ([AddressField](#addressfield)): The address of the supplier or merchant.
458470

459471
```py
460472
print(result.document.inference.prediction.supplier_address.value)

docs/extras/guide/ind_passport_v1.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ Document
4545
4646
Inference
4747
#########
48-
:Product: mindee/ind_passport v1.0
48+
:Product: mindee/ind_passport v1.2
4949
:Rotation applied: Yes
5050
5151
Prediction
@@ -68,10 +68,10 @@ Prediction
6868
:Name of Mother:
6969
:Old Passport Date of Issue:
7070
:Old Passport Number:
71+
:Old Passport Place of Issue:
7172
:Address Line 1:
7273
:Address Line 2:
7374
:Address Line 3:
74-
:Old Passport Place of Issue:
7575
:File Number:
7676
```
7777

docs/extras/guide/invoices_v4.md

Lines changed: 53 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -70,12 +70,12 @@ print(result.document)
7070
########
7171
Document
7272
########
73-
:Mindee ID: 3e524d26-f7dc-4852-9bbf-833a127a9570
73+
:Mindee ID: 744748d5-9051-461c-b70c-bbf81f5ff943
7474
:Filename: default_sample.jpg
7575
7676
Inference
7777
#########
78-
:Product: mindee/invoices v4.10
78+
:Product: mindee/invoices v4.11
7979
:Rotation applied: Yes
8080
8181
Prediction
@@ -111,6 +111,8 @@ Prediction
111111
:Billing Address: 1954 Bloor Street West Toronto, ON, M6P 3K9 Canada
112112
:Document Type: INVOICE
113113
:Document Type Extended: INVOICE
114+
:Purchase Subcategory:
115+
:Purchase Category: miscellaneous
114116
:Line Items:
115117
+--------------------------------------+--------------+----------+------------+--------------+--------------+-----------------+------------+
116118
| Description | Product code | Quantity | Tax Amount | Tax Rate (%) | Total Amount | Unit of measure | Unit Price |
@@ -158,6 +160,8 @@ Page 0
158160
:Billing Address: 1954 Bloor Street West Toronto, ON, M6P 3K9 Canada
159161
:Document Type: INVOICE
160162
:Document Type Extended: INVOICE
163+
:Purchase Subcategory:
164+
:Purchase Category: miscellaneous
161165
:Line Items:
162166
+--------------------------------------+--------------+----------+------------+--------------+--------------+-----------------+------------+
163167
| Description | Product code | Quantity | Tax Amount | Tax Rate (%) | Total Amount | Unit of measure | Unit Price |
@@ -264,14 +268,33 @@ A `InvoiceV4LineItem` implements the following attributes:
264268
The following fields are extracted for Invoice V4:
265269

266270
## Billing Address
267-
**billing_address** ([StringField](#stringfield)): The customer billing address.
271+
**billing_address** ([AddressField](#addressfield)): The customer billing address.
268272

269273
```py
270274
print(result.document.inference.prediction.billing_address.value)
271275
```
272276

277+
## Purchase Category
278+
**category** ([ClassificationField](#classificationfield)): The purchase category.
279+
280+
#### Possible values include:
281+
- 'toll'
282+
- 'food'
283+
- 'parking'
284+
- 'transport'
285+
- 'accommodation'
286+
- 'telecom'
287+
- 'miscellaneous'
288+
- 'software'
289+
- 'shopping'
290+
- 'energy'
291+
292+
```py
293+
print(result.document.inference.prediction.category.value)
294+
```
295+
273296
## Customer Address
274-
**customer_address** ([StringField](#stringfield)): The address of the customer.
297+
**customer_address** ([AddressField](#addressfield)): The address of the customer.
275298

276299
```py
277300
print(result.document.inference.prediction.customer_address.value)
@@ -387,14 +410,38 @@ for reference_numbers_elem in result.document.inference.prediction.reference_num
387410
```
388411

389412
## Shipping Address
390-
**shipping_address** ([StringField](#stringfield)): Customer's delivery address.
413+
**shipping_address** ([AddressField](#addressfield)): Customer's delivery address.
391414

392415
```py
393416
print(result.document.inference.prediction.shipping_address.value)
394417
```
395418

419+
## Purchase Subcategory
420+
**subcategory** ([ClassificationField](#classificationfield)): The purchase subcategory for transport, food and shopping.
421+
422+
#### Possible values include:
423+
- 'plane'
424+
- 'taxi'
425+
- 'train'
426+
- 'restaurant'
427+
- 'shopping'
428+
- 'other'
429+
- 'groceries'
430+
- 'cultural'
431+
- 'electronics'
432+
- 'office_supplies'
433+
- 'micromobility'
434+
- 'car_rental'
435+
- 'public'
436+
- 'delivery'
437+
- None
438+
439+
```py
440+
print(result.document.inference.prediction.subcategory.value)
441+
```
442+
396443
## Supplier Address
397-
**supplier_address** ([StringField](#stringfield)): The address of the supplier or merchant.
444+
**supplier_address** ([AddressField](#addressfield)): The address of the supplier or merchant.
398445

399446
```py
400447
print(result.document.inference.prediction.supplier_address.value)

docs/extras/guide/us_healthcare_cards_v1.md

Lines changed: 19 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -40,17 +40,18 @@ print(result.document)
4040
########
4141
Document
4242
########
43-
:Mindee ID: 1e71d5f0-dedb-4070-9d94-9207cd9570b5
43+
:Mindee ID: 5e917fc8-5c13-42b2-967f-954f4eed9959
4444
:Filename: default_sample.jpg
4545
4646
Inference
4747
#########
48-
:Product: mindee/us_healthcare_cards v1.2
48+
:Product: mindee/us_healthcare_cards v1.3
4949
:Rotation applied: Yes
5050
5151
Prediction
5252
==========
5353
:Company Name: UnitedHealthcare
54+
:Plan Name: Choice Plus
5455
:Member Name: SUBSCRIBER SMITH
5556
:Member ID: 123456789
5657
:Issuer 80840:
@@ -64,14 +65,14 @@ Prediction
6465
:RX ID:
6566
:RX GRP: UHEALTH
6667
:RX PCN: 9999
67-
:copays:
68+
:Copays:
6869
+--------------+----------------------+
6970
| Service Fees | Service Name |
7071
+==============+======================+
71-
| 300.00 | emergency_room |
72-
+--------------+----------------------+
7372
| 20.00 | office_visit |
7473
+--------------+----------------------+
74+
| 300.00 | emergency_room |
75+
+--------------+----------------------+
7576
| 75.00 | urgent_care |
7677
+--------------+----------------------+
7778
| 30.00 | specialist |
@@ -110,13 +111,13 @@ The text field `StringField` only has one constraint: its **value** is an `Optio
110111
## Specific Fields
111112
Fields which are specific to this product; they are not used in any other product.
112113

113-
### copays Field
114-
Is a fixed amount for a covered service.
114+
### Copays Field
115+
Copayments for covered services.
115116

116117
A `HealthcareCardV1Copay` implements the following attributes:
117118

118-
* **service_fees** (`float`): The price of service.
119-
* **service_name** (`str`): The name of service of the copay.
119+
* **service_fees** (`float`): The price of the service.
120+
* **service_name** (`str`): The name of the service.
120121

121122
#### Possible values include:
122123
- primary_care
@@ -137,8 +138,8 @@ The following fields are extracted for Healthcare Card V1:
137138
print(result.document.inference.prediction.company_name.value)
138139
```
139140

140-
## copays
141-
**copays** (List[[HealthcareCardV1Copay](#copays-field)]): Is a fixed amount for a covered service.
141+
## Copays
142+
**copays** (List[[HealthcareCardV1Copay](#copays-field)]): Copayments for covered services.
142143

143144
```py
144145
for copays_elem in result.document.inference.prediction.copays:
@@ -195,6 +196,13 @@ print(result.document.inference.prediction.member_name.value)
195196
print(result.document.inference.prediction.payer_id.value)
196197
```
197198

199+
## Plan Name
200+
**plan_name** ([StringField](#stringfield)): The name of the healthcare plan.
201+
202+
```py
203+
print(result.document.inference.prediction.plan_name.value)
204+
```
205+
198206
## RX BIN
199207
**rx_bin** ([StringField](#stringfield)): The BIN number for prescription drug coverage.
200208

0 commit comments

Comments
 (0)