HealthShare Personal Community Custom Application Guide
These custom applications can be added to the application as:
These custom applications need to adhere to the intended use and best practices outlined below.
The custom application feature is designed to support a variety of use cases. These can include, but are not limited to the following:
Regions building custom applications are the owners of the application and its functionality. This includes:
The custom application feature has the following limitations:
Review Required
Teams are required to review their proposed applications with InterSystems
prior
to agreeing with the customer to provide this functionality. Review is required to ensure that the application does not change the intended use of the product overall and affect our current compliance regulations.
As this application will be embedded into Personal Community, it should align with the design principals and best practices for this product. When creating your application, ensure that the following conditions have been met:
The custom application feature of Personal Community uses the Angular Module Federation to inject micro front-ends into the application.
In Angular, the term "micro front-end" refers to the architectural strategy of dividing a large, massive Angular application into more manageable, independent front-end modules. Each module can be built, deployed, and maintained independently, and each represents a particular feature or functionality of the program.
The custom Angular application must always be built using the same Angular version of Personal Community. As of the 2024.3 release, that is Angular 14.
To allow your application to be included in the Personal Community Module Federation, it must be converted to a micro front-end. This can be done by running the following two commands on your finished Angular application:
After converting to a micro front-end, the application must be exposed properly to be embedded in Personal Community. The following steps assume that your application uses NgModules, has an AppModule and AppRoutingModule, and is not a standalone component. If it is a standalone component, you can run step 1 with "app" instead of "feature" to generate necessary files.
Your custom application needs to be accessible from a web server that your Personal Community instance can communicate with.
Options for hosting your application include:
It is important that your application is served over the same protocol as your Personal Community application. For a production system, all applications should be served over HTTPS.
All strings displayed to patients in Personal Community come from the i18n files. These files allow the application to easily support multiple languages and customized strings in the application. As part of this feature, you will need to create a new key value pair to represent your custom application name. This value will be displayed as the title for the main or secondary menu item, so should be a short string or label.
The en-us.json file should always be updated as this is the default file used if keys are not found in other i18n files.
To add your application name to the i18n files:
Applications that appear in the main menu are displayed with an icon when viewed on a desktop browser. By default, Personal Community provides a standard icon that can be used. This icon can be replaced with another Material Design icon in SVG format by completing the following:
On the available applications list, the
Status
column indicates whether or not the application is currently enabled and available for use in Personal Community, and the
Actions
column indicates what actions can be taken against this application.
Actions include:
To add a new application to Personal Community:
1.
Overview
2.
Intended Use Statement
2.1.
Sample Use Cases
2.2.
Considerations and Limitations
2.2.1.
Considerations
2.2.2.
Limitations
3.
Custom Application Requirements
3.1.
Design Principles
3.2.
Technical Requirements
3.2.1.
Angular Application Requirements
3.2.2.
Converting your Angular Application to a Micro Front-End
npm i -g @angular-architects/module-federation@14.3
ng add @angular-architects/module-federation@14.3 --type remote
ng generate module feature --routing --project=<app-name>
ng generate module feature --routing --project=<app-name>
web-pack.config.js
, update "exposes" as follows:
exposes: {
'./FeatureModule': './<path-to-app>/src/<path-to-feature-module>/feature.module.ts',
},
{
// Use empty route to immediately redirect to the FeatureModule
path: '',
loadChildren: () =>
import('./<path-to-feature-module>/feature.module').then((m) => m.FeatureModule),
},
4.
Configuring Personal Community for Including Custom Applications
4.1.
Installing the Custom Application in your Web Server
4.2.
Adding Custom Application Label to i18n Files
4.3.
Adding Custom Icons for your Application
4.4.
Adding Custom Applications in the Workbench
Configuration Manager
role.