HL7v2 Routing
# support
e
How would I set up my on-prem agent to send to different bots? Is that possible? If it’s an ORU go to this Bot If it’s and ORM go to this Bot etc OR Would we have it ingest into one BOT then route to different Bots? Example On prem agent —> Bot(returns Ack) If ORM THEN routes to ORM Bot If ORU THEN routes to ORU not Etc
m
Hi @ElNiño121! Our guidance is to have one bot per sending device for all incoming messages, and then maintain different helper functions (processADT, processORM) that sit in the same bot. If you want to reuse these helper functions across different bots, you can use the standard Typescript/Javascript imports and exports, and [build your bot](https://www.medplum.com/docs/bots/bots-in-production#compiling-your-bot) before deployment
e
I think I’m understanding what you’re saying Do you mean creating a bot for processORM before deployment And calling it in Medplum bot? Kinda like import { HL7message } from ‘@medplum/core’} import {processORM } from ‘./src/myfirstbot.ts’ ?
@Maddy
r
Hi @ElNiño121 , yes I think that's right. You can share processing code between bots, and then call different helper functions depending on the message type
152 Views