@myhealth-belgium/webcomponent-vaccinations 1.2.0 → 1.3.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/CHANGELOG.md CHANGED
@@ -1,3 +1,10 @@
1
+ # 1.3.0
2
+
3
+ **New features:**
4
+
5
+ - Removed the optional `isLegacy` input in favor of providing two web components, where one is legacy (KMEHR) mode and the other is not (FHIR).
6
+ - Added docs on how to implement the legacy `mh-web-component-vaccinations-legacy` component using the `legacy` MyHealthModule. (Implementation is the same as non-legacy component)
7
+
1
8
  # 1.2.0
2
9
 
3
10
  **New features:**
package/README.md CHANGED
@@ -15,7 +15,9 @@ import { manifest, bootstrap } from '@myhealth-belgium/web-component-vaccination
15
15
  bootstrap({ settings: SETTINGS, services: SERVICES });
16
16
 
17
17
  // Place the webcomponent in your HTML for it to render
18
- return <mh-web-component-vaccinations print={printToPdf($event)}></mh-web-component-vaccinations>;
18
+ return (
19
+ <mh-web-component-vaccinations onprint={printToPdf($event)} full-name="John Doe"></mh-web-component-vaccinations>
20
+ );
19
21
  ```
20
22
 
21
23
  To integrate the design-kit, also import the webcomponent's styles in your code. For more information, see **Design kit integration**.
@@ -38,20 +40,41 @@ Each MyHealth webcomponent provides a `manifest` constant that is compliant with
38
40
 
39
41
  The manifest can be viewed to see the component(s) inside the package, as well as required additional inputs and outputs that the component may emit.
40
42
 
41
- #### Vaccinations component
43
+ #### Vaccinations component (FHIR)
42
44
 
43
45
  `tagName`: `<mh-web-component-vaccinations />`
44
46
 
45
- | Property | Type | Required | Description |
46
- | --------------- | ------------------- | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
47
- | `user-language` | `UserLanguage` | No | The language for the webcomponent interface. Automatically updates the translation service when changed. |
48
- | `config-name` | `ConfigName` | No | The configuration name that determines the environment and API endpoints. Set to `"demo"` to use mock data instead of API calls. |
49
- | `full-name` | `string` | No | The user's full name, will be displayed in the PDF on the top right side if it is provided. |
50
- | `isLegacy` | `boolean`, `string` | No | Turning legacy mode `false` will render the vaccinations web component with FHIR and KMEHR data. Turning legacy mode `true` will render the vaccinations web component with only KMEHR data. Using a string would expect `"true"` or `"false"`. |
47
+ | Property | Type | Required | Description |
48
+ | --------------- | -------------- | -------- | -------------------------------------------------------------------------------------------------------------------------------- |
49
+ | `user-language` | `UserLanguage` | No | The language for the webcomponent interface. Automatically updates the translation service when changed. |
50
+ | `config-name` | `ConfigName` | No | The configuration name that determines the environment and API endpoints. Set to `"demo"` to use mock data instead of API calls. |
51
+ | `full-name` | `string` | No | The user's full name, will be displayed in the PDF on the top right side if it is provided. |
52
+ | Event | Type | Required | Description |
53
+ | --------- | ------------ | -------- | --------------------------------------- |
54
+ | `onprint` | `printEvent` | **Yes** | Emits content that neesd to be printed. |
51
55
 
52
- | Event | Type | Required | Description |
53
- | --------- | ------------ | -------- | --------------------------------------- |
54
- | `onprint` | `printEvent` | **Yes** | Emits content that neesd to be printed. |
56
+ ### Legacy vaccinations component (KMEHR)
57
+
58
+ `tagName`: `<mh-web-component-vaccinations-legacy />`
59
+
60
+ The implementation for this component is similar to the implementation of the non-legacy component:
61
+
62
+ ```ts
63
+ import { legacy } from '@myhealth-belgium/web-component-vaccinations';
64
+
65
+ // Call bootstrap function with your HostSettings & HostServices
66
+ legacy.bootstrap({ settings: SETTINGS, services: SERVICES });
67
+
68
+ // Place the webcomponent in your HTML for it to render
69
+ return (
70
+ <mh-web-component-vaccinations-legacy
71
+ onprint={printToPdf($event)}
72
+ full-name="John Doe"
73
+ ></mh-web-component-vaccinations-legacy>
74
+ );
75
+ ```
76
+
77
+ All inputs and outputs are identical to the non-legacy component.
55
78
 
56
79
  ### Mock data
57
80
 
package/index.d.ts CHANGED
@@ -1,3 +1,4 @@
1
1
  import './lib/styles.scss';
2
2
  import 'zone.js';
3
3
  export { manifest, bootstrap } from './lib/main';
4
+ export { legacy } from './lib/legacy';
@@ -0,0 +1,11 @@
1
+ import { OnInit } from '@angular/core';
2
+ import { BaseWebComponent } from '@myhealth-belgium/web-component-utils';
3
+ import * as i0 from "@angular/core";
4
+ export declare class VaccinationsLegacyWebComponent extends BaseWebComponent implements OnInit {
5
+ private readonly vaccinationsService;
6
+ readonly fullName: import("@angular/core").InputSignal<string>;
7
+ ngOnInit(): void;
8
+ printVaccinations(content: string): Promise<void>;
9
+ static ɵfac: i0.ɵɵFactoryDeclaration<VaccinationsLegacyWebComponent, never>;
10
+ static ɵcmp: i0.ɵɵComponentDeclaration<VaccinationsLegacyWebComponent, "mh-web-component-vaccinations-legacy", never, { "fullName": { "alias": "fullName"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
11
+ }
@@ -3,12 +3,9 @@ import { BaseWebComponent } from '@myhealth-belgium/web-component-utils';
3
3
  import * as i0 from "@angular/core";
4
4
  export declare class VaccinationsWebComponent extends BaseWebComponent implements OnInit {
5
5
  private readonly vaccinationsService;
6
- private readonly isLegacyDefault;
7
6
  readonly fullName: import("@angular/core").InputSignal<string>;
8
- readonly isLegacy: import("@angular/core").InputSignal<string | boolean>;
9
- readonly useLegacyMode: import("@angular/core").Signal<boolean>;
10
7
  ngOnInit(): void;
11
8
  printVaccinations(content: string): Promise<void>;
12
9
  static ɵfac: i0.ɵɵFactoryDeclaration<VaccinationsWebComponent, never>;
13
- static ɵcmp: i0.ɵɵComponentDeclaration<VaccinationsWebComponent, "mh-web-component-vaccinations", never, { "fullName": { "alias": "fullName"; "required": false; "isSignal": true; }; "isLegacy": { "alias": "isLegacy"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
10
+ static ɵcmp: i0.ɵɵComponentDeclaration<VaccinationsWebComponent, "mh-web-component-vaccinations", never, { "fullName": { "alias": "fullName"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
14
11
  }
@@ -0,0 +1,5 @@
1
+ import { MyHealthModule, MyHealthModuleBootstrap, MyHealthModuleManifest } from '@smals-belgium/myhealth-wc-integration';
2
+ export declare const legacyTagName: string;
3
+ export declare const manifest: MyHealthModuleManifest;
4
+ export declare const bootstrap: MyHealthModuleBootstrap;
5
+ export declare const legacy: MyHealthModule;