Introduction
This section describes the standard objects available to JavaScript callbacks executing in the Smile CDR JavaScript execution environment.
Here is the current list of JavaScript callbacks available in Smile CDR
Module | Config | Function(s) |
---|---|---|
Channel Import | etl_script.text | handleChannelImportJsonPayload(...) handleChannelImportStringPayload(...) |
FHIR Endpoint | consent_service.script.text | consentStartOperation(...) consentCanSeeResource(...) consentWillSeeResource(...) completeOperationSuccess(...) completeOperationFailure(...) |
HL7 v2.x Listening Endpoint | listener_script.text | onPreConvertHl7V2ToFhir(...) onPostConvertHl7V2ToFhir(...) |
HL7 v2.x Sending Endpoint | mapper_script.text | onPostConvertFhirToHl7V2(...) |
FHIR Storage | callback_script.text | fhirResourcePreCreate(...) fhirResourceCreated(...) fhirResourcePreUpdate(...) fhirResourceUpdated(...) fhirResourcePreDelete(...) fhirResourceDeleted(...) |
FHIR Storage | javascript_repository_validation.script.text | repositoryValidationProvideRules(...) |
FHIR Storage | livebundle_service.script.text | buildLiveBundleRuleSet() |
MDM | survivorship_script.text | mdmApplySurvivorshipRules(...) |
MDM | key_interceptor_script.text | mdmGenerateMessageKey(...) |
Local Inbound Security | callback_script.text | onAuthenticateSuccess(...) |
Local Inbound Security | user_self_registration.create_script.text | onUserSelfRegistrationRequest(...) |
Scripted Inbound Security | script.text | authenticate(...) |
Smart Outbound Security | codap.auth_script.text | authenticate(...) |
Smart Outbound Security | post_authorize_script.text | onAuthenticateSuccess(...) authenticate(...) onSmartLoginPreContextSelection(...) onTokenGenerating(...) onPostAuthorize(...) |
Cda Exchange | cda_processing_script.text | onPreImportCDA(...) onPostImportCDA(...) onPostExportCDA(...) |
patient.name.family
with patient.name[0].family
string.contains('foo')
with string.includes('foo')
string.replaceAll('foo', 'bar')
with string.split('foo').join('bar')
string.regionMatches(true, 0, 'foo', 0, 3)
with .substring(0, 3).toUpperCase() === 'foo'
==
to ===