@mindbill/angular 0.5.0 → 0.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +35 -4
- package/fesm2022/mindbill-angular.mjs +652 -9
- package/fesm2022/mindbill-angular.mjs.map +1 -1
- package/package.json +1 -1
- package/types/mindbill-angular.d.ts +113 -5
package/README.md
CHANGED
|
@@ -6,13 +6,15 @@ Native Angular billing UI with built-in session renewal, bill lifecycle API call
|
|
|
6
6
|
npm install @mindbill/angular @mindbill/node
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
-
Import the standalone component and
|
|
9
|
+
Import the standalone components. The submission component owns the review form, reference-directory lookups, validation, PDF upload, and atomic submission; the host app only provides initial case data and a short-lived browser session.
|
|
10
10
|
|
|
11
11
|
```ts
|
|
12
12
|
import { Component } from "@angular/core";
|
|
13
13
|
import {
|
|
14
14
|
MindBillBillLifecycleComponent,
|
|
15
|
+
MindBillBillSubmissionComponent,
|
|
15
16
|
MindBillBillingDashboardComponent,
|
|
17
|
+
MindBillBillingManagementButtonComponent,
|
|
16
18
|
MindBillBillingReportComponent,
|
|
17
19
|
} from "@mindbill/angular";
|
|
18
20
|
|
|
@@ -21,23 +23,39 @@ import {
|
|
|
21
23
|
standalone: true,
|
|
22
24
|
imports: [
|
|
23
25
|
MindBillBillLifecycleComponent,
|
|
26
|
+
MindBillBillSubmissionComponent,
|
|
24
27
|
MindBillBillingDashboardComponent,
|
|
28
|
+
MindBillBillingManagementButtonComponent,
|
|
25
29
|
MindBillBillingReportComponent,
|
|
26
30
|
],
|
|
27
31
|
template: `
|
|
32
|
+
@if (!billId) {
|
|
33
|
+
<mindbill-bill-submission
|
|
34
|
+
[initialBill]="initialBill"
|
|
35
|
+
[attachments]="attachments"
|
|
36
|
+
sessionEndpoint="/api/mindbill/session"
|
|
37
|
+
[appearance]="{ preset: 'clinical-blue' }"
|
|
38
|
+
(submitted)="billId = $event.bill.id"
|
|
39
|
+
/>
|
|
40
|
+
} @else {
|
|
28
41
|
<mindbill-bill-lifecycle
|
|
29
42
|
[billId]="billId"
|
|
30
43
|
sessionEndpoint="/api/mindbill/session"
|
|
31
44
|
[appearance]="{ preset: 'clinical-blue' }"
|
|
32
45
|
/>
|
|
46
|
+
}
|
|
33
47
|
`,
|
|
34
48
|
})
|
|
35
49
|
export class CaseBillingComponent {
|
|
36
|
-
billId = "
|
|
50
|
+
billId = "";
|
|
51
|
+
initialBill = caseToMindBillInput(this.case);
|
|
52
|
+
attachments = [{ file: this.finalReport, description: "Final report" }];
|
|
37
53
|
}
|
|
38
54
|
```
|
|
39
55
|
|
|
40
|
-
|
|
56
|
+
`MindBillBillSubmissionComponent` marks required fields, scrolls to invalid input, resolves ZIP codes, searches the MindBill claims-administrator and ICD-10 directories, calculates service-line totals, and uploads attachments. On success, render `MindBillBillLifecycleComponent` with the returned bill ID. The lifecycle component loads its own immutable bill snapshot, status, EORs, payments, history, and available actions.
|
|
57
|
+
|
|
58
|
+
The default reference directories and field rules live in the component library. Hosts can provide custom procedure, modifier, and taxonomy options without reimplementing the form. For a fixture or Storybook, pass an async `submitter`; omit it in production so the component talks directly to the Partner API.
|
|
41
59
|
|
|
42
60
|
Add one authenticated server endpoint. It maps the signed-in user's role to permissions and mints a short-lived token bound to your organization, that user, and the browser origin.
|
|
43
61
|
|
|
@@ -59,9 +77,22 @@ app.post("/api/mindbill/session", requireUser, async (req, res) => {
|
|
|
59
77
|
|
|
60
78
|
Your permanent API key never reaches Angular. Available presets are `mindbill`, `qme-companion`, `orange-bright`, and `clinical-blue`; every visual token can also be overridden.
|
|
61
79
|
|
|
80
|
+
## Billing management SSO
|
|
81
|
+
|
|
82
|
+
Use the ready-made button wherever organization-level users should open the full MindBill workspace:
|
|
83
|
+
|
|
84
|
+
```html
|
|
85
|
+
<mindbill-billing-management-button
|
|
86
|
+
sessionEndpoint="/api/mindbill/management-session"
|
|
87
|
+
[appearance]="{ preset: 'clinical-blue' }"
|
|
88
|
+
/>
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
The endpoint returns `{ "url": "https://app.mindbill.org/..." }` after authenticating the user and creating a short-lived management session. The component opens a blank tab synchronously, then navigates it after the request completes so Safari and other popup blockers do not discard the SSO window.
|
|
92
|
+
|
|
62
93
|
## Operations components
|
|
63
94
|
|
|
64
|
-
The operations surfaces consume a normalized list of bills, so they can be used together or independently:
|
|
95
|
+
The operations surfaces consume a normalized list of bills, so they can be used together or independently. The dashboard includes monthly submitted/closed metrics, clickable aging buckets, search, status filtering, and bill drill-down:
|
|
65
96
|
|
|
66
97
|
```html
|
|
67
98
|
<mindbill-billing-dashboard
|