Skip to content

Commit eba6f45

Browse files
✨ add support for Findoc V1.12, Invoices V4.10, US Healthcare Cards V1.2
1 parent 9406c4c commit eba6f45

File tree

8 files changed

+90
-9
lines changed

8 files changed

+90
-9
lines changed

docs/financial_document_v1.md

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ public class SimpleMindeeClient {
107107
########
108108
Document
109109
########
110-
:Mindee ID: f469a24d-3875-4a83-ad43-e0d5aa9da604
110+
:Mindee ID: a80ac0ee-26f6-4e2e-988a-960b240d5ba7
111111
:Filename: default_sample.jpg
112112
113113
Inference
@@ -132,7 +132,7 @@ Prediction
132132
+---------------+--------+----------+---------------+
133133
| Base | Code | Rate (%) | Amount |
134134
+===============+========+==========+===============+
135-
| | | 5.00 | 9.75 |
135+
| 195.00 | | 5.00 | 9.75 |
136136
+---------------+--------+----------+---------------+
137137
:Supplier Payment Details:
138138
:Supplier Name: JOHN SMITH
@@ -184,7 +184,7 @@ Page 0
184184
+---------------+--------+----------+---------------+
185185
| Base | Code | Rate (%) | Amount |
186186
+===============+========+==========+===============+
187-
| | | 5.00 | 9.75 |
187+
| 195.00 | | 5.00 | 9.75 |
188188
+---------------+--------+----------+---------------+
189189
:Supplier Payment Details:
190190
:Supplier Name: JOHN SMITH
@@ -389,6 +389,24 @@ System.out.println(result.getDocument().getInference().getPrediction().getDocume
389389
System.out.println(result.getDocument().getInference().getPrediction().getDocumentType().value);
390390
```
391391

392+
## Document Type Extended
393+
**documentTypeExtended**: Document type extended.
394+
395+
#### Possible values include:
396+
- 'CREDIT NOTE'
397+
- 'INVOICE'
398+
- 'OTHER'
399+
- 'OTHER_FINANCIAL'
400+
- 'PAYSLIP'
401+
- 'PURCHASE ORDER'
402+
- 'QUOTE'
403+
- 'RECEIPT'
404+
- 'STATEMENT'
405+
406+
```java
407+
System.out.println(result.getDocument().getInference().getPrediction().getDocumentTypeExtended().value);
408+
```
409+
392410
## Due Date
393411
**dueDate**: The date on which the payment is due.
394412

docs/invoices_v4.md

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ public class SimpleMindeeClient {
107107
########
108108
Document
109109
########
110-
:Mindee ID: 86b1833f-138b-4a01-8387-860204b0e631
110+
:Mindee ID: b55db8f9-ae3b-4f05-b2f1-ec0ced5e5b70
111111
:Filename: default_sample.jpg
112112
113113
Inference
@@ -131,7 +131,7 @@ Prediction
131131
+---------------+--------+----------+---------------+
132132
| Base | Code | Rate (%) | Amount |
133133
+===============+========+==========+===============+
134-
| | | 8.00 | 193.20 |
134+
| 2145.00 | | 8.00 | 193.20 |
135135
+---------------+--------+----------+---------------+
136136
:Supplier Payment Details:
137137
:Supplier Name: TURNPIKE DESIGNS
@@ -177,7 +177,7 @@ Page 0
177177
+---------------+--------+----------+---------------+
178178
| Base | Code | Rate (%) | Amount |
179179
+===============+========+==========+===============+
180-
| | | 8.00 | 193.20 |
180+
| 2145.00 | | 8.00 | 193.20 |
181181
+---------------+--------+----------+---------------+
182182
:Supplier Payment Details:
183183
:Supplier Name: TURNPIKE DESIGNS
@@ -351,6 +351,24 @@ System.out.println(result.getDocument().getInference().getPrediction().getDate()
351351
System.out.println(result.getDocument().getInference().getPrediction().getDocumentType().value);
352352
```
353353

354+
## Document Type Extended
355+
**documentTypeExtended**: Document type extended.
356+
357+
#### Possible values include:
358+
- 'CREDIT NOTE'
359+
- 'INVOICE'
360+
- 'OTHER'
361+
- 'OTHER_FINANCIAL'
362+
- 'PAYSLIP'
363+
- 'PURCHASE ORDER'
364+
- 'QUOTE'
365+
- 'RECEIPT'
366+
- 'STATEMENT'
367+
368+
```java
369+
System.out.println(result.getDocument().getInference().getPrediction().getDocumentTypeExtended().value);
370+
```
371+
354372
## Due Date
355373
**dueDate**: The date on which the payment is due.
356374

docs/us_healthcare_cards_v1.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,15 @@ A `HealthcareCardV1Copay` implements the following attributes:
137137
* **serviceFees** (`Double`): The price of service.
138138
* **serviceName** (`String`): The name of service of the copay.
139139

140+
#### Possible values include:
141+
- primary_care
142+
- emergency_room
143+
- urgent_care
144+
- specialist
145+
- office_visit
146+
- prescription
147+
148+
140149
# Attributes
141150
The following fields are extracted for Healthcare Card V1:
142151

@@ -223,6 +232,13 @@ System.out.println(result.getDocument().getInference().getPrediction().getRxBin(
223232
System.out.println(result.getDocument().getInference().getPrediction().getRxGrp().value);
224233
```
225234

235+
## RX ID
236+
**rxId**: The ID number for prescription drug coverage.
237+
238+
```java
239+
System.out.println(result.getDocument().getInference().getPrediction().getRxId().value);
240+
```
241+
226242
## RX PCN
227243
**rxPcn**: The PCN number for prescription drug coverage.
228244

src/main/java/com/mindee/product/financialdocument/FinancialDocumentV1Document.java

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
import lombok.Getter;
2121

2222
/**
23-
* Financial Document API version 1.11 document data.
23+
* Financial Document API version 1.12 document data.
2424
*/
2525
@Getter
2626
@EqualsAndHashCode(callSuper = false)
@@ -72,6 +72,11 @@ public class FinancialDocumentV1Document extends Prediction {
7272
*/
7373
@JsonProperty("document_type")
7474
protected ClassificationField documentType;
75+
/**
76+
* Document type extended.
77+
*/
78+
@JsonProperty("document_type_extended")
79+
protected ClassificationField documentTypeExtended;
7580
/**
7681
* The date on which the payment is due.
7782
*/
@@ -218,6 +223,7 @@ public boolean isEmpty() {
218223
&& this.shippingAddress == null
219224
&& this.billingAddress == null
220225
&& this.documentType == null
226+
&& this.documentTypeExtended == null
221227
&& this.subcategory == null
222228
&& this.category == null
223229
&& this.totalTax == null
@@ -324,6 +330,9 @@ public String toString() {
324330
outStr.append(
325331
String.format(":Document Type: %s%n", this.getDocumentType())
326332
);
333+
outStr.append(
334+
String.format(":Document Type Extended: %s%n", this.getDocumentTypeExtended())
335+
);
327336
outStr.append(
328337
String.format(":Purchase Subcategory: %s%n", this.getSubcategory())
329338
);

src/main/java/com/mindee/product/invoice/InvoiceV4Document.java

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
import lombok.Getter;
2121

2222
/**
23-
* Invoice API version 4.9 document data.
23+
* Invoice API version 4.10 document data.
2424
*/
2525
@Getter
2626
@EqualsAndHashCode(callSuper = false)
@@ -62,6 +62,11 @@ public class InvoiceV4Document extends Prediction {
6262
*/
6363
@JsonProperty("document_type")
6464
protected ClassificationField documentType;
65+
/**
66+
* Document type extended.
67+
*/
68+
@JsonProperty("document_type_extended")
69+
protected ClassificationField documentTypeExtended;
6570
/**
6671
* The date on which the payment is due.
6772
*/
@@ -187,6 +192,7 @@ public boolean isEmpty() {
187192
&& this.shippingAddress == null
188193
&& this.billingAddress == null
189194
&& this.documentType == null
195+
&& this.documentTypeExtended == null
190196
&& (this.lineItems == null || this.lineItems.isEmpty())
191197
);
192198
}
@@ -285,6 +291,9 @@ public String toString() {
285291
outStr.append(
286292
String.format(":Document Type: %s%n", this.getDocumentType())
287293
);
294+
outStr.append(
295+
String.format(":Document Type Extended: %s%n", this.getDocumentTypeExtended())
296+
);
288297
String lineItemsSummary = "";
289298
if (!this.getLineItems().isEmpty()) {
290299
int[] lineItemsColSizes = new int[]{38, 14, 10, 12, 14, 14, 17, 12};

src/main/java/com/mindee/product/us/healthcarecard/HealthcareCardV1Document.java

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
import lombok.Getter;
1313

1414
/**
15-
* Healthcare Card API version 1.1 document data.
15+
* Healthcare Card API version 1.2 document data.
1616
*/
1717
@Getter
1818
@EqualsAndHashCode(callSuper = false)
@@ -74,6 +74,11 @@ public class HealthcareCardV1Document extends Prediction {
7474
*/
7575
@JsonProperty("rx_grp")
7676
protected StringField rxGrp;
77+
/**
78+
* The ID number for prescription drug coverage.
79+
*/
80+
@JsonProperty("rx_id")
81+
protected StringField rxId;
7782
/**
7883
* The PCN number for prescription drug coverage.
7984
*/
@@ -91,6 +96,7 @@ public boolean isEmpty() {
9196
&& this.groupNumber == null
9297
&& this.payerId == null
9398
&& this.rxBin == null
99+
&& this.rxId == null
94100
&& this.rxGrp == null
95101
&& this.rxPcn == null
96102
&& (this.copays == null || this.copays.isEmpty())
@@ -129,6 +135,9 @@ public String toString() {
129135
outStr.append(
130136
String.format(":RX BIN: %s%n", this.getRxBin())
131137
);
138+
outStr.append(
139+
String.format(":RX ID: %s%n", this.getRxId())
140+
);
132141
outStr.append(
133142
String.format(":RX GRP: %s%n", this.getRxGrp())
134143
);

src/test/java/com/mindee/product/invoice/InvoiceV4Test.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ void whenEmptyDeserialized_mustHaveValidProperties() throws IOException {
5959
Assertions.assertNull(docPrediction.getShippingAddress().getValue());
6060
Assertions.assertNull(docPrediction.getBillingAddress().getValue());
6161
Assertions.assertInstanceOf(ClassificationField.class, docPrediction.getDocumentType());
62+
Assertions.assertInstanceOf(ClassificationField.class, docPrediction.getDocumentTypeExtended());
6263
Assertions.assertTrue(docPrediction.getLineItems().isEmpty());
6364
}
6465

src/test/java/com/mindee/product/us/healthcarecard/HealthcareCardV1Test.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ void whenEmptyDeserialized_mustHaveValidProperties() throws IOException {
4242
Assertions.assertNull(docPrediction.getGroupNumber().getValue());
4343
Assertions.assertNull(docPrediction.getPayerId().getValue());
4444
Assertions.assertNull(docPrediction.getRxBin().getValue());
45+
Assertions.assertNull(docPrediction.getRxId().getValue());
4546
Assertions.assertNull(docPrediction.getRxGrp().getValue());
4647
Assertions.assertNull(docPrediction.getRxPcn().getValue());
4748
Assertions.assertTrue(docPrediction.getCopays().isEmpty());

0 commit comments

Comments
 (0)