Skip to content

css-ch/livo-coverage-information

Repository files navigation

LivoCoverageInformation

Inputs

baseUrl

Url should point to the api used to fetch service providers

  • Type: string

translations

An object containing all necessary translations

  • Type: object of strings
// for example:
{
  acute: 'Akut',
  listBoth: 'Ist auf Liste Balance und Premium',
  listPremiumOnly: 'Ist nur auf Liste Premium',
  psychiatry: 'Psychiatrie',
  rehab: 'Reha',
  serviceProvider: 'Leistungserbringer',
  maxRateNote: 'Bei diesem Leistungserbringer ist ein Maximaltarif festgelegt. Auf welche Leistungen dieser bezogen ist und in welcher Höhe dieser ausfällt, respektive wie hoch die jeweilige Deckung und eine allfällige Kostenbeteiligung sind, wird vor dem Spitaleintritt im Rahmen der Kostengutsprache mitgeteilt.',
  specialisedClinic: 'Spezialklinik',
  higherCoPayment: 'KoBe 75%, max. CHF 10‘000/KJ',
  variant1: 'Variante 1: KoBe CHF 0',
  variant2: 'Variante 2: KoBe 25% max. CHF 5’000/KJ',
  variant3: 'Variante 3: KoBe 50% max. CHF 10’000/KJ',
  notOnListCoPayment: 'KoBe min. 75%. Die CSS deckt max. CHF 1‘500/Nacht',
  notOnListError: 'Kein Leistungserbringer gefunden',
}

insurance

An object containing the necessary insurance information of the current customer

  • Type: object
type insurance = {
  livo: 'balance' | 'premium';
  variant: 1 | 2 | 3;
}

Usage in angular project

  1. import main.js to desired component
// sample.component.ts
import '@css-ch/livo-coverage-information/dist/main.js'
  1. import CUSTOM_ELEMENTS_SCHEMA and add to component decorators
// sample.component.ts
import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
// other imports

@Component({
// other decorators
schemas: [CUSTOM_ELEMENTS_SCHEMA]
})
  1. use custom tag in template and provide with inputs
// sample.component.html
<livo-coverage-information [baseUrl]="'https://sampleapi.com'" [translations]="myTranslationObject" [insurance]="myInsuranceObject"></livo-coverage-information>
  1. import styles
// styles.scss
@import "@css-ch/livo-coverage-information/dist/styles";

API

They API is called on the baseURL with a get request and should return a JSON object. They JSON should equivalent to following the typescript interface:

type ServiceProvider = [
  {
    id: number;
    name: string;
    town: string;
    types: [
      {
        type: 'acute' | 'rehab' | 'psychiatry' | 'specialised';
        balance: boolean;
        premium: boolean;
        hasMaxRate: boolean;
      },
    ];
  },
];

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •