0.1.1 • Published 11 months ago
@meetportal/insurance-js v0.1.1
Insurance JS for Portal
This library provides schemas and helper functions for Portal insurance resources.
Installation
npm install @meetportal/insurance-js
If you have not already done so, you will also need to install the Portal JS library:
npm install @meetportal/portal-js
Usage
import { usePortalService } from '@meetportal/portal-js'
import { CUSTOMER_TYPE, VERSION, CustomerResource } from '@meetportal/insurance-js'
let resource: CustomerResource = {
id: '123',
type: CUSTOMER_TYPE,
version: VERSION,
demographics: {
ids: ['123'],
firstName: 'John',
lastName: 'Doe',
dob: '01/01/1970',
birthSex: 'M',
email: 'john.doe@mail.com',
phones: [
{
type: 'home',
number: '123-456-7890',
},
],
address1: '123 Main St',
address2: 'Apt 1',
city: 'Anytown',
state: 'NY',
zip: '12345',
}
}
usePortalService().setResource(resource)