2.0.0 • Published 1 month ago

@smals-belgium-shared/vidis-delivered-medication-detail v2.0.0

Weekly downloads
-
License
LGPL-3.0-or-later
Repository
-
Last release
1 month ago

Vidis delivered medications detail web component

Context

VIDIS (Virtual Integrated Drug Information System) integrates several sources and systems:

In order to be reused by other software vendors, the VIDIS front-end is now split into web components. The container application will have to provide the input parameters to provision the web component with a working context.

Prerequisites

  • A supported browser by our Web Components AND by eHealth
  • A valid VIDIS token. It could be obtained from eHealth Token eXchange service. This token must be refreshed periodically in order to be used by VIDIS
  • Notify partners that are using REST APIs so your VIDIS tokens & clients will be trusted :
    • Vitalink & their Apigee service – Contact: vitalink-support@smals.be
    • Farmaflux – Contact: vidis@farmaflux.be

⚠️ IE (internet explorer) is not supported. You can include polyfill scripts ("polyfills") for the browsers that you must support.

Features

This web component provides users with a comprehensive prescription details. The component displays important information about a given delivered medication, such as:

  • Medication Name: The name of the medication delivered to the patient.
  • Posology: The prescribed dosage regimen, including the frequency, amount to be taken, and any other special instructions that might be relevant.
  • Delivery Date: The exact date when the medication was delivered, making it easier to track when the medication was received.
  • Quantity: The number of units or dosage forms delivered (e.g., tablets, bottles), allowing users to verify they have received the correct amount.
  • Patient Name: In cases where the medication is delivered to someone on behalf of another individual, the patient's name is clearly highlighted to make this distinction clear. This is crucial to avoid confusion, especially for family members or caregivers picking up medications on behalf of the patient. The clear highlight of patient names for those receiving medications on behalf of others reduces the risk of medication mix-ups or confusion, ensuring that each medication reaches the correct recipient.
  • Leaflet: The patient information leaflet or any other documentation that accompanies the medication. This is useful for patients who need more detailed guidance on how to take the medication, potential side effects, and other important safety information.
  • ...

Inputs

NameMandatoryPossible valuesDescription
languagetrueen, de, fr, nlThe 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.
configNametrueacc, prodName of the configuration the application and the components are being deployed to.
servicestrueN/ASet of services to be consumed by the component. see USAGE.
dguidtrueN/ADelivered medication dguid to display.

Usage

<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
	<title>Vidis delivered medications detail web component</title>
	<meta name="viewport" content="width=device-width, initial-scale=1">
	<script type="module" src="delivered-medication-detail/delivered-medication-detail.js"></script>
	<link rel="stylesheet" href="delivered-medication-detail/delivered-medication-detail.css">
</head>
<body>
<script>
	const wc = document.createElement("vidis-delivered-medication-detail");

	// Common inputs for all VIDIS web components
	// Refer to https://www.npmjs.com/package/@smals-belgium/myhealth-wc-integration for more details
	wc.language = 'en'
	wc.configName = 'acc';
	wc.services = {
		cache: {
			get: (key) => (undefined),
			set: (key, value) => {
			},
			remove: (key) => {
			}
		},
		getAccessToken: async (audience) => "TODO : the eHealth OAuth2 JWT token.",
		registerRefreshCallback: () => {
		}
	}

	// Example on how to provide extra input parameter(s), if needed / requested by the component
	// wc["attributeName"] = "myValue" 

	// Example on how to listen to output parameter(s)
	wc.addEventListener("eventName", (event) => {
		console.log(`event:`, event)
		const params = event.detail;
		console.log('param:', params);
	})

	// Example on how to listen to output parameter(s), for printing
	wc.addEventListener("onPrint", (event) => {
		console.log(`event:`, event)
		const params = event.detail;
		console.log('param:', params);

		const byteArray = new Uint8Array(atob(params.content).split('').map(char => char.charCodeAt(0)))
		const blob = new Blob([byteArray], {type: 'application/pdf'})
		const url = window.URL.createObjectURL(blob)
		window.open(url, '_blank').print()
	})

	document.body.append(wc);
</script>
</body>
</html>

Versioning

This project follows Semantic Versioning. 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 file for more info.

Accessibility

We are committed to making our web components accessible to all users. Our components are:

  • Screen reader friendly : Designed to work well with popular screen readers (Talkback / VoiceOver / ...)
  • Responsive : Adapt to various screen sizes (desktop / mobile).
  • Compliant: Meet accessibility criteria, including ARIA labels and keyboard navigation

Customizations

The web components are build with Angular Material. The styling of it is overwritten by the “My Health” portal, by there design kit.

Troubleshoots

If you encounter issues while using the web components :

  • Ensure that your token is valid and hasn't expired. For assistance, contact eHealth.
  • Ensure you are using the latest version of the web components
  • Ensure you are using a supported browser and that you have cleared your cache if issues persist.
  • Ensure your organization, browser or device don't block calls to VIDIS API by any way.
  • If none of the above, please contact mijngeneesmiddelen@riziv-inami.fgov.be / mesmedicaments@riziv-inami.fgov.be

License

GNU Lesser General Public License v3.0 or later

2.0.0

1 month ago

1.1.3

2 months ago

1.1.2

2 months ago

1.1.1

2 months ago

1.1.0

2 months ago

1.0.6

4 months ago

1.0.5

4 months ago

1.0.4

4 months ago

1.0.2

4 months ago