[![js-semistandard-style](https://cdn.rawgit.com/flet/semistandard/master/badge.svg)](https://github.com/Flet/semistandard)

# Mycure Vue Facility-patients module

## *Installation and Usage*

```sh
$ yarn add @mycure/facility-patients
```

- use as a vue plugin

```javascript
import Vue from 'vue';
import McFacilityPatients from '@mycure/facility-patients';

Vue.use(McFacilityPatients, opts: ServiceOpts)
```

- above will do the ff:
  + describe side effects here
  + sample side effects:
    - attach a global method/attribute
    - attach an instance method/attribute
    - add components
    - sync a single and multi vuex store modules

```typescript
  interface StoreOpts {
    moduleName: string = 'facility-patients',
    multi: boolean = true    // ataches a multi item vuex store module
    single: boolean = true   // ataches a single item vuex store module
  }

  interface ServiceOpts {
    // will be used to auto-generate query functions
    firebaseApp?: firebase.App
    authService?: AuthService
    // for registering built-in store modules
    store: VuexStore
    storeOpts?: StoreOpts
    // and other valid SingleItemSyncService and MultiItemSyncService configs, see @topsi/services docus
  }
```

## *VuexStoreModules*

### **SingleItemStoreModule**

```typescript
vuexModuleName = 'facility-patients-single'
interface RegisteredVuexModule extends RegisteredSingleItemStoreModule { // see @topsi/services docus for its RegisteredSingleItemStoreModule
}
```

### **MultiItemStoreModule**

```typescript
vuexModuleName = 'facility-patients-multi'
interface RegisteredVuexModule extends RegisteredMultiItemStoreModule { // see @topsi/services docus for its RegisteredMultiItemStoreModule
}
```

