Smart App in MPage

44 views
Skip to first unread message
Assigned to chy...@gmail.com by Fenil....@cerner.com

GEM_JJ

unread,
Jul 26, 2021, 2:36:52 PM7/26/21
to Cerner FHIR Developers
We are trying to embed a generic react app in MPage.
We have a confusion over the documentation.

 According to the documentation in https://github.com/cerner/cerner-smart-embeddable-lib there are 2 approaches
1.NPM Module (Recommended)
2.Script Include (NOT recommended)

If we are using approach 1 which is NPM approach do we need to follow any more steps other than the below:
1.Install package:npm install cerner-smart-embeddable-lib
2.Import the package in our project: import 'cerner-smart-embeddable-lib'

If we are using approach2 only, we have to use 'hidden' attribute for html & manual script includes.
Could you please confirm?

Yixuan Chen (Cerner)

unread,
Jul 27, 2021, 10:58:18 AM7/27/21
to Cerner FHIR Developers
Hello,

1. For NPM approach, once the library is installed by using npm install cerner-smart-embeddable-lib, you will need to use the contents from the package as mentioned here : https://github.com/cerner/cerner-smart-embeddable-lib#npm-module-recommended
It is always good to walk through the whole document. For example, within the README.md there is a Config section here: https://github.com/cerner/cerner-smart-embeddable-lib#config. You don't need to include embeddable library JS and CSS files by using NPM packages. But the babel polyfill dependency is not in the package so you will still need to pull that in separately.
Also, I want to refer you to the Additional Considerations section on the README.md: https://github.com/cerner/cerner-smart-embeddable-lib#additional-consideration. Just to make sure those considerations are known and are not being implemented as well.

2. The HTML hidden tag is required by security and highly recommended set up by the application codes. You will want to include it in all HTML documents.

Best,
Yixuan(Cerner)
Reply all
Reply to author
Forward
0 new messages