Testing Bots with Bundle Input
# support
j
Hello! I am trying to test a Bot locally where we take in some Bundle input and return a risk score calculation using Bundle resource entries. When trying to execute I get errors saying Bundle is not a valid JSON. Are Bundles simply not acceptable inputs for bots or am I missing something? Thank you. Alternatively can Bots take in multiple resources as input and is there an example for this?
@reshma @rahul1 Could you please help with this question, thank you!
r
Hi @jennie_02345 , thank you for your patience. Bot should be able to accept Bundles as a valid input
How are you executing the Bot? If you're using the "Execute" button on the Medplum App, you should be aware of a known bug - if your bot doesn't return valid JSON, you may see an error message complaining of invalid JSON
j
Ohh I see. I am having my Bot simply return a float value. But I it seems I should be returning a resource such as MeasureReport for example to store this score I am calculating? Thank you!
@rahul1 If we want to have the Bot output be a value from a measureReport how should we go about doing this. Thank you!
r
You can just return a JS object that matches the schema of the FHIR MeasureReport object
145 Views