19.1.0 • Published 3 months ago

@softheon/healthcare v19.1.0

Weekly downloads
16
License
-
Repository
-
Last release
3 months ago

HealthcareShared

This library was generated with Angular CLI version 8.0.3.

Code scaffolding

Run ng generate component component-name --project healthcare to generate a new component. You can also use ng generate directive|pipe|service|class|guard|interface|enum|module --project healthcare.

Note: Don't forget to add --project healthcare or else it will be added to the default project in your angular.json file.

Build

Run ng build healthcare to build the project. The build artifacts will be stored in the dist/ directory.

Publishing

After building your library with ng build healthcare, go to the dist folder cd dist/healthcare and run npm publish.

Running unit tests

Run ng test healthcare to execute the unit tests via Karma.

Further help

To get more help on the Angular CLI use ng help or go check out the Angular CLI README.

Healthcare Verbiage

To use translation keys present within the Healthcare project, you must have these keys present in your project code.

The current set of translation keys is listed below, in english and spanish. Using these translation keys allows for text to not be sent as configured input objects, but instead referenced from the HTML directly.

These do not need to be present if the associated HTML is not used in the given application.

TODO - In the future, determine a way to export the sample translation files so they can be used directly when integrated with a new application.

  "sof-healthcare": {
    "contact-menu": {
      "chat": "Open Chat",
      "close": "Close Contact Menu",
      "open": "Open Contact Menu"
    },
    "header": {
      "font": "Click to change font size"
    }
  },
    "footer": {
          "telemarketerIcon-alt": "Telemarketer Contact Me Icon"
    }
{
  "sof-healthcare": {
    "contact-menu": {
      "chat": "Conversación abierta",
      "close": "Cerrar Menú Contacto",
      "open": "Abrir menú de contacto"
    },
    "header": {
      "font": "Haga clic para cambiar el tamaño de fuente"
    }
  }
}

Healthcare Footer

<sof-healthcare-footer></sof-healthcare-footer> is a site map that goes into the footer.

Healthcare Footer Pre-requisites

Softheon Armature must be included in the package.json

Healthcare Footer Setup Overview

  1. npm install
  2. Import the armature Module into your app.module.ts 'imports'.
  3. Add Healthcare Footer component sof-healthcare-footer to HTML component.
  4. Configure Healthcare Footer component settings in the TS
    1. [showDisclaimer] - allows you to choose whether or not to include the disclaimer.
    2. [showSiteMap] - allows you to choose whether or not to include the site map.
    3. [showDisclosure] - allows you to choose whether or not to include the disclosure.
    4. [telemarketerIconUrl] - the telemarketerIcon url, if not provided it would not show up.
    5. [disclaimerTexts] - a list of text and styleClass pairs to display the texts inside the disclaimer box. The styleClass is optional.
    6. [disclosureTexts] - a list of text and styleClass pairs to display the texts inside the disclosure box. The styleClass is optional.
    7. [secondaryDisclosureTexts] - a list of text and styleClass pairs to display the texts inside the secondary disclosure box. The styleClass is optional.
    8. [siteMapComponentConfig] - the armature site map config - see armature documentation for more info on how to configure it.
    9. [stateCode] - the state code text - will only show if provided.
    10. [stateDropdownTexts] - should be 2 keys, One for the leading text before the dropdown, and the other for the mat-label of the dropdown.
    11. [showStateDropdown] - allows you to choose whether or not to include the state drop down.
    12. [currentSelectedState] - the state that should be shown in the dropdown as currently selected.
  5. Output Events
    1. [stateChangeEvent] - emits the value of the user selected state from the dropdown.

Site Map Module Setup

Module.ts:

import { HealthcareModule } from 'projects/healthcare/src/public-api';

...

@NgModule({
    imports: [
        ...
        HealthcareModule
        ...
    ],
    ...
})

Healthcare Footer Typescript Component Setup

Import the necessary models from the npm package and configure the Healthcare Footer component inputs in your Angular typescript component. We recommend you do this ngOnInit().

Configure the Healthcare Footer Component Site Map configs. Below shows an example of how to setup the configs for the disclaimer, disclosure and the secondary disclosure. Refer to the Armature Site Map documentation to setup the Site Map.

  public disclaimerTexts: Array<FooterText> = [
    {
      text: 'demo.large-text',
      styleClass: 'text-blue'
    }
  ];

  public disclosureTexts: Array<FooterText> = [
    {
      text: 'demo.large-text'
    }
  ];

  public secondaryDisclosureTexts: Array<FooterText> = [
    {
      text: 'demo.large-text'
    }
  ];

  public stateDropdownTexts: Array<FooterText> = [
    {
      text: 'demo.large-text'
    }
  ];

Healthcare Footer HTML Setup

The following is an example of how to setup the Healthcare Footer

<sof-healthcare-footer [disclaimerTexts]="disclaimerTexts"
                [disclosureTexts]="disclosureTexts"
                [secondaryDisclosureTexts]="secondaryDisclosureTexts"
                [telemarketerIconUrl]=telemarketerIcon
                [siteMapComponentConfig]=siteMapComponentConfig
                [stateCode]="'demo.state-code' | translate"
                [showStateDropdown]="true"
                [stateDropdownTexts]="stateDropdownTexts"
                [currentSelectedState]="NY"
                (stateChangeEvent)="stateChanged($event)">
    <ng-container sof-healthcare-footer-center>
    </ng-container>
    <ng-container sof-healthcare-footer-disclaimer> 
        <p [innerHtml]="'demo.large-text' | translate">
        </p>
    </ng-container>
</sof-healthcare-footer>

Healthcare Footer Custom Components

It is also possible to have additional customize component in each of the sections by using ng-content.

Below is a table of each ng-content and where they reside

Content NameLocation
sof-healthcare-footer-disclaimerBelow the text in disclaimer box
sof-healthcare-footer-centerBelow the site map
sof-healthcare-footer-scroll-boxBelow the text in disclosure scroll box
sof-healthcare-footer-secondary-disclosureBelow the text in secondary disclosure box
sof-healthcare-footer-mid-bottomBelow the secondary disclosure box
sof-healthcare-footer-bottomBelow the state code

PCP Selection Tool

"<sof-healthcare-pcp-selection-tool>" is a component with the function to search for PCP(Primary Care Provider).

Usage

To utilize the PCP selection tool component, you need to install "@softheon/healthcare" library, and install the dependency package, especially the "@angular/google-maps" and "@googlemaps/js-api-loader" package which are optional when install "@softheon/healthcare" library.

After install the required dependencies, then you could import the desired "PcpSelectionToolModule" from the '@softheon/healthcare/pcp-selection-tool' entry point.(NOTE: here the PCP selection tool module is at a sub entry point which is different from "@softheon/healthcare").

After the above steps, you are good to utilize the PCP selection tool, either using the "<sof-healthcare-pcp-selection-tool>" template tag or directly calling the "PCPSelectionToolComponent".

Below is a typecal implementation example of utilize the PCP selection tool embeded in the Angular Material "MatBottomSheet" container. Suppose the component named "pcp-selection.component"

Template code in "pcp-selection.component.html":

<div class="content-container">
    <h1 class="merriweather">{{'pcp-selection.title' | translate}}</h1>
    <p class="body1" [innerHTML]="'pcp-selection.description1' | translate"></p>
    <button id="btnPCPSelection" class="sof-flat-button text-to-upper-case"
        mat-flat-button color="primary" (click)="selectPCP()">
        {{'pcp-selection.button-text' | translate}}
    </button>
</div>

Typescript code in "pcp-selection.component.ts":

import { Component } from '@angular/core';
import { MatBottomSheet } from '@angular/material/bottom-sheet';
import { County } from '@softheon/healthcare';
import { PCPSelectionData, SofPCPSelectionComponent } from '@softheon/armature-pcp-tool';

@Component({
  selector: 'app-pcp-selection',
  templateUrl: './pcp-selection.component.html',
  styleUrls: ['./pcp-selection.component.scss']
})
export class PCPSelectionComponent {
  constructor(private matBottomSheet: MatBottomSheet) {}
  public selectPCP() {
    const mockMemberAddress = {
      street1: "900 Northwest 17th Street",
      street2: "",
      city: "Miami",
      county: {
        state: "FL",
        zipCode: "33130"
      } as County
    };
    const pcpSelectionData = {
      googleMapApiKey: "YOUR GOOGLE MAP API KEY",
      isProviderNameRequired: true,
      distanceOptions: [5, 10, 25, 50, 100],
      pcpSpecialtyAllTextKey: "pcp-selection.bottom-sheet.pcpSpecialtyAllText",
      pcpSpecialtyOptions: ["Family Practice", "General Practice", 
        "Internal Medicine", "Nurse Practitioner", "Physician Assistant", "Pediatricians"],
      markerAmountLimit: 3,
      enableGoogleMap: true,
      planId: "92120FL0090004-00",
      relationship: "SELF",
      memberName: "James Holden",
      residentialAddress: mockMemberAddress,
      genderPronounsMapping: [
      {
        gender:"M",
        pronounTextKey: "pcp-select.bottom-sheet.heHimPronounsText"
      },
      {
        gender: "F",
        pronounTextKey: "pcp-select.bottom-sheet.sheHerPronounsText"
      }
    ],
      preHeaderTextKey: 'pcp-selection.bottom-sheet.preHeaderText',
      headerTextKey: 'pcp-selection.bottom-sheet.headerText',
      providerNameLabelTextKey: 'pcp-selection.bottom-sheet.providerNameLabelText',
      specialtyLabelTextKey: 'pcp-selection.bottom-sheet.specialtyLabelText',
      distanceLabelTextKey: 'pcp-selection.bottom-sheet.distanceLabelText',
      noSearchResultMessageTextKey: 'pcp-selection.bottom-sheet.noSearchResultMessageText',
      searchResultSummaryTextKey: 'pcp-selection.bottom-sheet.searchResultSummaryText',
      cancelButtonTextKey: 'pcp-selection.bottom-sheet.cancelButtonText',
      searchButtonTextKey: 'pcp-selection.bottom-sheet.searchButtonText',
      selectButtonTextKey: 'pcp-selection.bottom-sheet.selectButtonText',
      newPatientsTextKey: 'pcp-selection.bottom-sheet.newPatientsText',
      existingPatientsOnlyTextKey: 'pcp-selection.bottom-sheet.existingPatientsOnlyText',
      existingPatientTooltipTextKey: 'pcp-selection.bottom-sheet.existingPatientTooltipText',
      isExistingPatientAssertTextKey: 'pcp-selection.bottom-sheet.isExistingPatientAssertText',
      languageSubtitleTextKey: 'pcp-select.bottom-sheet.languageSubtitleText'
  } as PCPSelectionData;
    
    let bottomSheetRef = this.matBottomSheet.open(SofPCPSelectionComponent, {
      data: pcpSelectionData
    });
    bottomSheetRef.afterDismissed().subscribe(
      (res) => {
        alert("Selection Complete: See returned result in console log.");
        console.log(res);
      }
  )
  }
}

For the above "genderPronounsMapping" config, it could be implement in the config service of the application that utilize this PCP tool component.

The sample language verbiage could be as follow.

{
  "pcp-selection": {
    "description1": "The Armature styling is based on the design guide located here <a target=\"blank\" href=\"https://www.figma.com/file/hkty13Kk2VquUBlTb9C9uf/Consumer-Shopping-%5b%E2%9C%8F%EF%B8%8F-WORKING-FILE%5d?type=design&node-id=5775%3A112270&mode=design&t=1Lsu1ub7CYx4jzhP-1\">Softheon Design Guide - PCP Selection Dialog</a>.",
    "title": "PCP Selection Dialog",
    "button-text": "PCP Selection",
    "bottom-sheet": {
      "preHeaderText": "Select a Primary Care Provider",
      "headerText": "Select a provider for {{memberName}}",
      "providerNameLabelText": "Provider Name",
      "specialtyLabelText": "Specialty",
      "distanceLabelText": "Distance (miles)",
      "noSearchResultMessageText": "No results matching those search terms were found.",
      "searchResultSummaryText": "Showing ({{displayResultCount}}) results {{distance}} miles from {{searchAddress}}.",
      "cancelButtonText": "CANCEL",
      "searchButtonText": "SEARCH",
      "selectButtonText": "SELECT",
      "newPatientsText": "New Patients",
      "existingPatientsOnlyText": "Existing patients only",
      "existingPatientTooltipText": "This provider only accept patients that are currently enrolled.",
      "isExistingPatientAssertText": "I am an existing patient.",
      "sheHerPronounsText": "(She/Her)",
      "heHimPronounsText": "(He/Him)",
      "languageSubtitleText": "Languages",
      "pcpSpecialtyAllText": "All"
    }
  },
}

The styles can be add to "pcp-selection.component.scss" file. The possible sample style for the bottom sheet could be as below.

/** Custom Bottom Sheet Styles */
.mat-bottom-sheet-container {
  min-width: 100vw !important;
  max-height: 90vh !important;
  border-radius: 20px 20px 0px 6px !important;
}

The above component used the Angular Material MatBottomSheet component, so don't forget to import the "MatBottomSheetModule" in your app module.

19.0.0

4 months ago

17.14.7

4 months ago

17.14.3

6 months ago

17.14.4

6 months ago

17.14.5

5 months ago

17.14.6

5 months ago

17.14.0

7 months ago

17.14.1

7 months ago

17.14.2

6 months ago

17.12.0

8 months ago

17.13.5

7 months ago

17.13.6

7 months ago

17.13.0

8 months ago

17.13.1

8 months ago

17.13.2

7 months ago

17.13.3

7 months ago

19.1.0

3 months ago

17.11.3

8 months ago

17.11.2

9 months ago

17.11.1

9 months ago

15.19.0

9 months ago

17.11.0

9 months ago

17.9.2

10 months ago

17.9.1

10 months ago

17.9.3

10 months ago

17.10.0

9 months ago

17.10.1

9 months ago

17.9.0

10 months ago

17.4.1

1 year ago

17.4.2

12 months ago

17.7.0

10 months ago

17.7.1

10 months ago

15.18.0

1 year ago

17.8.0

10 months ago

17.5.0

12 months ago

17.5.1

12 months ago

17.6.5

10 months ago

17.6.4

11 months ago

17.6.6

10 months ago

17.6.1

12 months ago

17.6.0

12 months ago

17.6.3

11 months ago

17.6.2

11 months ago

17.3.1

1 year ago

15.17.0

1 year ago

17.3.0

1 year ago

15.16.0

1 year ago

15.15.1

1 year ago

17.2.1

1 year ago

15.15.0

1 year ago

15.14.0

1 year ago

17.1.0

1 year ago

17.0.2

1 year ago

17.0.1

1 year ago

17.0.0

1 year ago

15.13.2

1 year ago

15.13.1

1 year ago

15.13.0

1 year ago

15.12.0

2 years ago

15.7.0

2 years ago

15.7.1

2 years ago

15.0.6

2 years ago

15.8.0

2 years ago

15.5.0

2 years ago

15.3.0

2 years ago

15.4.0

2 years ago

15.10.0

2 years ago

15.1.1

2 years ago

15.1.2

2 years ago

15.1.0

2 years ago

15.1.3

2 years ago

15.9.0

2 years ago

15.11.0

2 years ago

15.2.0

2 years ago

15.2.1

2 years ago

15.2.2

2 years ago

15.2.3

2 years ago

15.0.3

2 years ago

15.0.4

2 years ago

15.0.5

2 years ago

15.0.2

2 years ago

15.0.0

2 years ago

15.0.1

2 years ago

10.28.0

2 years ago

10.29.0

2 years ago

10.26.0

3 years ago

10.27.0

2 years ago

10.24.0

3 years ago

10.25.0

3 years ago

10.19.1

3 years ago

10.19.0

3 years ago

10.23.0

3 years ago

10.20.0

3 years ago

10.17.0

3 years ago

10.21.0

3 years ago

10.18.2

3 years ago

10.18.0

3 years ago

10.18.1

3 years ago

10.16.0

3 years ago

10.8.0

3 years ago

10.15.0

3 years ago

10.11.0

3 years ago

10.7.0

3 years ago

10.7.1

3 years ago

10.12.0

3 years ago

10.6.0

3 years ago

10.13.0

3 years ago

10.9.0

3 years ago

10.14.0

3 years ago

10.10.0

3 years ago

10.5.2

3 years ago

10.4.1

3 years ago

10.3.1

3 years ago

10.5.1

3 years ago

10.2.1

3 years ago

10.2.0

3 years ago

4.14.1

4 years ago

10.0.1

4 years ago

10.0.2

4 years ago

4.14.0

4 years ago

4.13.2

4 years ago

4.13.3

4 years ago

4.13.1

4 years ago

10.1.0

4 years ago

4.12.1

4 years ago

4.12.0

4 years ago

4.11.4

4 years ago

4.11.5

4 years ago

4.11.2

4 years ago

4.11.3

4 years ago

4.11.1

4 years ago

4.10.9

4 years ago

4.10.6

4 years ago

4.10.7

4 years ago

4.10.8

4 years ago

4.10.10

4 years ago

4.10.5

4 years ago

4.10.4

4 years ago

4.10.2

4 years ago

4.10.3

4 years ago

4.10.1

4 years ago

4.9.1

4 years ago

4.8.3

4 years ago

4.8.1

4 years ago

4.8.0

4 years ago

4.8.2

4 years ago

4.7.0

4 years ago

4.6.7

4 years ago

4.6.8

4 years ago

4.6.6

4 years ago

4.6.5

4 years ago

4.6.4

4 years ago

4.6.3

4 years ago

4.6.2

4 years ago

4.6.1

4 years ago

4.6.0

4 years ago

4.5.3

4 years ago

4.5.2

4 years ago

4.5.0

4 years ago

4.5.1

4 years ago

4.4.1

4 years ago

4.4.0

4 years ago

4.3.0

4 years ago

4.2.0

4 years ago

4.1.0

4 years ago

4.0.0

4 years ago

3.9.10

4 years ago

3.9.9

4 years ago

3.9.8

4 years ago

3.9.7

4 years ago

3.9.6

4 years ago

3.9.5

5 years ago

3.9.4

5 years ago

3.9.3

5 years ago

3.9.2

5 years ago

3.9.1

5 years ago

3.9.0

5 years ago

3.8.3

5 years ago

3.8.2

5 years ago

3.8.1

5 years ago

3.8.0

5 years ago

3.7.0

5 years ago

3.6.1

5 years ago

3.6.0

5 years ago

3.5.2

5 years ago

3.5.1

5 years ago

3.5.0

5 years ago

3.4.0

5 years ago

3.4.1

5 years ago

3.3.1

5 years ago

3.3.0

5 years ago

3.2.5

5 years ago

3.2.4

5 years ago

3.2.3

5 years ago

3.2.2

5 years ago

3.2.1

5 years ago

3.2.0

5 years ago

3.1.0

5 years ago

3.0.6

5 years ago

3.0.5

5 years ago

3.0.4

5 years ago

3.0.3

5 years ago

3.0.2

5 years ago

3.0.1

5 years ago

3.0.0

5 years ago

2.0.1

5 years ago

2.0.0

5 years ago

1.1.43

5 years ago

1.1.42

5 years ago

1.1.41

5 years ago

1.1.40

5 years ago

1.1.39

5 years ago

1.1.38

5 years ago

1.1.37

5 years ago

1.1.36

5 years ago

1.1.34

5 years ago

1.1.35

5 years ago

1.1.33

5 years ago

1.1.32

5 years ago

1.1.31

5 years ago

1.1.30

5 years ago

1.1.29

5 years ago

1.1.28

5 years ago

1.1.27

5 years ago

1.1.26

5 years ago

1.1.25

5 years ago

1.1.23

5 years ago

1.1.24

5 years ago

1.1.19

5 years ago

1.1.22

5 years ago

1.1.21

5 years ago

1.1.20

5 years ago

1.1.18

5 years ago

1.1.17

5 years ago

1.1.15

5 years ago

1.1.14

5 years ago

1.1.13

5 years ago

1.1.9

5 years ago

1.1.12

5 years ago

1.1.11

5 years ago

1.1.10

5 years ago

1.1.8

5 years ago

1.1.7

5 years ago

1.1.6

5 years ago

1.1.5

5 years ago

1.1.4

5 years ago

1.1.3

5 years ago

1.1.2

5 years ago

1.1.1

5 years ago

1.1.0

5 years ago

1.0.26

5 years ago

1.0.25

5 years ago

1.0.24

5 years ago

1.0.23

5 years ago

1.0.22

5 years ago

1.0.21

5 years ago

1.0.19

5 years ago

1.0.20

5 years ago

1.0.18

5 years ago

1.0.17

5 years ago

1.0.16

5 years ago

1.0.15

5 years ago

1.0.14

5 years ago

1.0.13

5 years ago

1.0.12

5 years ago

1.0.11

5 years ago

1.0.10

5 years ago

1.0.9

5 years ago

0.0.8

5 years ago

0.0.7

5 years ago

0.0.6

5 years ago

0.0.5

5 years ago

0.0.4

5 years ago

0.0.3

5 years ago

0.0.2

5 years ago

0.0.1

5 years ago