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?
jennie_02345
10/11/2024, 5:32 PM
@reshma@rahul1 Could you please help with this question, thank you!
r
rahul1
10/12/2024, 5:38 AM
Hi @jennie_02345 , thank you for your patience. Bot should be able to accept Bundles as a valid input
rahul1
10/12/2024, 5:38 AM
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
jennie_02345
10/14/2024, 11:33 PM
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!
jennie_02345
10/14/2024, 11:57 PM
@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
rahul1
10/15/2024, 12:24 AM
You can just return a JS object that matches the schema of the FHIR MeasureReport object