@smals-belgium-shared/vidis-diarynote 1.0.2

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/README.md ADDED
@@ -0,0 +1,145 @@
1
+ # Vidis diary notes web component
2
+ ## Context
3
+
4
+ VIDIS (Virtual Integrated Drug Information System) integrates several sources and systems:
5
+ - [Recip-e][Recip-e] prescriptions
6
+ - [Vitalink][Vitalink] / [RSW][RSW] / [RSB][RSB] medication scheme
7
+ - [Vitalink][Vitalink] / [RSW][RSW] / [RSB][RSB] diary notes
8
+ - [Farmaflux][Farmaflux] delivered medications
9
+
10
+ In order to be reused by other software vendors, the VIDIS front-end is now split into [web components][Web component explanations].
11
+ The container application will have to provide the input parameters to provision the web component with a working context.
12
+
13
+ ## Prerequisites
14
+
15
+ - A supported browser [by our Web Components](https://angular.dev/reference/versions#browser-support) AND [by eHealth][Supported browsers]
16
+ - A valid VIDIS token. It could be obtained from [eHealth Token eXchange][eHealth IAM] service. This token must be refreshed periodically in order to be used by VIDIS
17
+
18
+ ⚠️ IE (internet explorer) is not supported. You can include [polyfill scripts ("polyfills")](https://www.webcomponents.org/polyfills) for the browsers that you must support.
19
+
20
+
21
+ ## Features
22
+
23
+ The diary notes web component allows patients and caregivers to keep detailed, organized records of health-related events, changes, or observations, which can be crucial for ongoing treatment or communication with healthcare providers.
24
+
25
+ ### List of diary notes
26
+
27
+ The main view displays a list of all diary notes that have been created by the patient or caregiver. For each entry, the following key information is shown:
28
+
29
+ - **Author:** The person who wrote the note (e.g., patient, caregiver, or healthcare provider).
30
+ - **Creation Date:** The date and time when the note was created.
31
+ - **Summary of the Note:** A brief preview or summary of the note’s content, allowing users to quickly assess the subject matter of each entry without opening the full note.
32
+
33
+ ### Note management
34
+
35
+ - **Delete Notes:** Users can delete notes that are no longer needed or relevant, helping to keep the diary organized and clutter-free.
36
+ - **Filtering:** The component allows users to filter notes based on specific criteria, such as:
37
+ - **Period:** Filter notes by date range, helping users review notes from a particular timeframe (e.g., last week, last month).
38
+ - **Author:** Users can filter notes by the author, enabling them to view entries made by a specific person (e.g., only the patient’s notes or caregiver’s notes).
39
+ - **Roles:** Filter by roles (e.g., caregiver, patient, healthcare provider) to distinguish the perspective of different authors.
40
+ - **Sorting:** Notes can be sorted by different parameters, such as creation date or author, giving users more control over how they view the list.
41
+ - **Adding a Note:**
42
+ - **Text-only Notes:** Users can add new diary notes by simply typing in text.
43
+ - **Notes with Attachments:** Users can also add attachments to their notes, allowing for richer documentation (e.g., photos, reports, or scanned documents).
44
+
45
+ ⚠️ **Attachment Restrictions:** Attachments have size limitations (e.g., maximum file size) and format restrictions (e.g., PDF, JPG, PNG) as explained by safes cookbook document.
46
+
47
+ ## Inputs
48
+
49
+ | Name | Mandatory | Possible values | Description |
50
+ |--------------|-----------|------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
51
+ | `language` | true | `en`, `de`, `fr`, `nl` | The language holds the current language as a value, which means it can change over time if the user changes his/her preferred language. The web component adapts the translations based on the value set. The values of the language property are defined in the Language enum. |
52
+ | `configName` | true | `acc`, `prod` | Name of the configuration the application and the components are being deployed to. |
53
+ | `services` | true | N/A | Set of services to be consumed by the component. see [USAGE](#Usage). |
54
+
55
+
56
+
57
+
58
+ ## Usage
59
+
60
+ ```html
61
+ <!DOCTYPE html>
62
+ <html>
63
+ <head>
64
+ <meta charset="utf-8">
65
+ <title>Vidis diary notes web component</title>
66
+ <meta name="viewport" content="width=device-width, initial-scale=1">
67
+ <script type="module" src="vidis-diarynote/diarynote.js"></script>
68
+ <link rel="stylesheet" href="vidis-diarynote/diarynote.css">
69
+ </head>
70
+ <body>
71
+ <script>
72
+ const wc = document.createElement("vidis-diarynote");
73
+
74
+ // Common inputs for all VIDIS web components
75
+ // Refer to https://www.npmjs.com/package/@smals-belgium/myhealth-wc-integration for more details
76
+ wc.language = 'en'
77
+ wc.configName = 'acc';
78
+ wc.services = {
79
+ cache: {
80
+ get: (key) => (undefined),
81
+ set: (key, value) => {}
82
+ } ,
83
+ getAccessToken: async (audience) => "TODO : the eHealth OAuth2 JWT token.",
84
+ registerRefreshCallback: () => { }
85
+ }
86
+
87
+ // Example on how to provide extra input parameter(s), if needed / requested by the component
88
+ // wc["attributeName"] = "myValue"
89
+
90
+ // Example on how to listen to output parameter(s)
91
+ wc.addEventListener("eventName", (event) => {
92
+ console.log(`event:`, event)
93
+ const params = event.detail;
94
+ console.log('param:', params);
95
+ })
96
+
97
+ document.body.append(wc);
98
+ </script>
99
+ </body>
100
+ </html>
101
+ ```
102
+
103
+
104
+ ## Versioning
105
+
106
+ This project follows [Semantic Versioning][Semver]. Each release is categorized by major, minor, and patch updates. Significant changes that may break existing integrations will be introduced with major versions. Please check [CHANGELOG.md](CHANGELOG.md) file for more info.
107
+
108
+ ## Accessibility
109
+
110
+ We are committed to making our web components accessible to all users. Our components are:
111
+ - Screen reader friendly : Designed to work well with popular screen readers (Talkback / VoiceOver / ...)
112
+ - Responsive : Adapt to various screen sizes (desktop / mobile).
113
+ - Compliant: Meet [accessibility criteria][OFAC], including ARIA labels and keyboard navigation
114
+
115
+ ## Customizations
116
+
117
+ The web components are build with [Angular Material][Angular Material]. The styling of it is overwritten by the “My Health” portal, by there [design kit][MHDK].
118
+
119
+ ## Troubleshoots
120
+
121
+ If you encounter issues while using the web components :
122
+
123
+ - Ensure that your token is valid and hasn't expired. For assistance, contact [eHealth][eHealth IAM].
124
+ - Ensure you are using the latest version of the web components
125
+ - Ensure you are using a supported browser and that you have cleared your cache if issues persist.
126
+ - If none of the above, please contact mijngeneesmiddelen@riziv-inami.fgov.be / mesmedicaments@riziv-inami.fgov.be
127
+
128
+ ## License
129
+
130
+ [GNU Lesser General Public License v3.0 or later](https://spdx.org/licenses/LGPL-3.0-or-later.html)
131
+
132
+ [Recip-e]: https://recip-e.be/
133
+ [Vitalink]: https://www.vitalink.be/
134
+ [RSW]: https://www.reseausantewallon.be/
135
+ [RSB]: https://brusselshealthnetwork.be/
136
+ [Farmaflux]: https://www.farmaflux.be/
137
+ [Web component explanations]: https://www.webcomponents.org/introduction
138
+ [eHealth IAM]:https://www.ehealth.fgov.be/ehealthplatform/nl/service-i.am-identity-access-management
139
+ [MHDK]: https://www.npmjs.com/package/@myhealth-belgium/design-kit
140
+ [Angular Material]: https://material.angular.io/
141
+ [OFAC]: https://openfed.github.io/AccessibilityCheck/
142
+ [Semver]: https://docs.npmjs.com/about-semantic-versioning
143
+ [MHWCI]: https://www.npmjs.com/package/@myhealth-belgium/webcomponent-integration
144
+ [Supported browsers]: https://www.ehealth.fgov.be/nl/page/hoe-toegang-krijgen-tot-applicaties
145
+