Smile CDR v2022.08.PRE
On this page:

32.0JavaScript Execution Environment

 

This section describes the standard objects available to JavaScript callbacks executing in the Smile CDR JavaScript execution environment.

32.0.1Change Log

 

Smile CDR 2022.05

  • Javascript engine upgraded from ECMAScript 2020 (11th edition) to ECMAScript 2021 (12th edition).
  • Added support for JavaScript Remote Debugging

Smile CDR 2020.08

  • Javascript engine upgraded to ECMAScript 2020.
  • JavaScript engine upgraded from nashorn to graal-js. The nashorn JavaScript engine is no longer supported. Oracle has deprecated nashorn and will remove it from a future release of the JDK.
  • The graal-js JavaScript engine supports ECMAScript 2020. This means that many ECMAScript features that were not available in previous versions of Smile CDR are now supported. However, it also means that you may need to make some changes to your Smile CDR JavaScript code. Here are some known changes you need to make:
    • When working with resource elements that have cardinality, indexes are now required: replace patient.name.family with patient.name[0].family
    • replace string.contains('foo') with string.includes('foo')
    • replace string.replaceAll('foo', 'bar') with string.split('foo').join('bar')
    • replace string.regionMatches(true, 0, 'foo', 0, 3) with .substring(0, 3).toUpperCase() === 'foo'
    • when comparing strings, change == to ===