@synanetics/messaging-processor
v3.2.4
Published
Processors to manage FHIR MessageHeader bundle workflows
Downloads
689
Maintainers
Keywords
Readme
@synanetics/messaging-processor
Processors to manage FHIR MessageHeader Bundle workflows
Usage
const { preProcess, postProcess } = require('@synanetics/messaging-processor');
// use a required
Both preProcess
and postProcess
require parameters context
and params
. Please see the available types for further details
Replacement
It is intended that this package can be replaced by another. Any replacement must export two named functions preProcess
and postProcess
and they must adhere to the interfaces outlined below.
Pre Processing
preProcess
- will receive params
context
- see type Contextparams
- see type ProcessorMessagemessage
- this is the Request bundle for processing
- must return results - see type ProcessorResult
message
will be your modified request BundleadditionalResources
must be populated with any resources subject to create/update operations that are not already in the request Bundle. This is vitally important as failure to include this will result in removal of the modified resources entirely.
Post Processing
postProcess
- will receive params
context
- see type Contextparams
- see type PostProcessorMessagemessage
- this is the Response bundle being sent backrequest
- this is the original Request bundle - you will use this to determine flow hooks if necessary
- must return results - see type ProcessorResult
message
will be your modified response BundleadditionalResources
must be populated with any resources subject to create/update operations that were not already in the request Bundle. This is vitally important as failure to include this will result in removal of the modified resources entirely.