Stream: python
Topic: Zulip Bot for FHIR Validation
Grahame Grieve (Apr 01 2020 at 11:15):
Zulip bots are written in python.. which I don't know. Does someone here want to hp me write a bot that integrates the FHIR validator into Zulip?
Josh Mandel (Apr 01 2020 at 13:24):
(As a minor clarification, Zulip has an http API and bots can be written in any language, though indeed the supported client libraries are in Python.)
Jose Costa Teixeira (Apr 01 2020 at 15:43):
I am a beginner. If nobody else shows up, I'll help - but it's best for everyone if I stay away from coding..
@Ilya Beda @Eric Haas @Pascal Pfiffner
Ilya Beda (Apr 02 2020 at 04:12):
Hi @Grahame Grieve I am ready to help you! Could you provide a bit more details?
Grahame Grieve (Apr 02 2020 at 04:21):
great. So we want to write a Zulip bot such that whenever anyone tags @validator in their message, the bot takes the message and the previous message and somehow gets it to a java process that running in the cloud somewhere
Grahame Grieve (Apr 02 2020 at 04:22):
I'm not quite clear how the best way to set this up is
Ilya Beda (Apr 02 2020 at 04:45):
Ok, I will review existing documentation and propose the solution.
Grahame Grieve (Apr 02 2020 at 04:47):
wonderful - thanks
Grahame Grieve (Apr 02 2020 at 11:01):
FYI: https://chat.zulip.org/#narrow/stream/2-general/topic/Validating.20examples
Jean Duteau (Apr 02 2020 at 14:44):
i really thought this was an april fool's joke. (especially because you spelled Zulip wrong in the topic title)
Jose Costa Teixeira (Apr 06 2020 at 11:38):
Grahame Grieve said:
great. So we want to write a Zulip bot such that whenever anyone tags @validator in their message, the bot takes the message and the previous message and somehow gets it to a java process that running in the cloud somewhere
do these have to be in different messages?
May be simpler (implementation-wise) to just do it all in one message like this:
Jose Costa Teixeira (Apr 06 2020 at 11:46):
hey @ validator
here's my json/xml
Grahame Grieve (Apr 06 2020 at 11:53):
well, so I (or someone else) can also look at a message and say "hey @ validator - look at that"
Jose Costa Teixeira (Apr 06 2020 at 11:58):
True.
If we have them separate, we call the validator right after the content? In this case, the bot must see the previous message from that user.
Jose Costa Teixeira (Apr 06 2020 at 11:58):
But if we put them together, we could simply quote messages, no?
Grahame Grieve (Apr 06 2020 at 12:22):
yes - easier.
Josh Mandel (Apr 06 2020 at 19:38):
I'd suggest putting something inline, like
image.png
Josh Mandel (Apr 06 2020 at 19:39):
(or more generally: make it clear exactly what is going to be validated; this could be in addition to a bot-mention, or just have the bot always lurking)
Grahame Grieve (Apr 06 2020 at 19:43):
I'm expecting that people won't do that, and one of the power users will need to ask for it to be done. Hence my interest in the previous message
Ilya Beda (Apr 08 2020 at 13:57):
Zulip bot API looks very nice.
I setup dev infrastructure and start experimenting with it.
I will start with a simple implementation.
You need to mention a bot by name and provide JSON+FHIR to validate, the bot will respond with validation result.
@validate {"resourceType": "Patient"}
Then I will improve this scenario to allow bot to validate the previous message in the chat.
Ilya Beda (Apr 08 2020 at 13:58):
@Grahame Grieve What web service bot should use for json validation?
Grahame Grieve (Apr 08 2020 at 20:08):
we're still working on the service.
Grahame Grieve (Apr 08 2020 at 20:09):
so I'll give you a URL but it will be this operation, I think: http://hl7.org/fhir/resource-operation-validate.html
Grahame Grieve (Apr 08 2020 at 20:11):
I think that the bot should just report counts: 1 Error, 2 warnings, 0 Hints (details) where details is a URL that links to OperationOutcome.meta.source
Josh Mandel (Apr 08 2020 at 21:24):
Does this mean a user could follow the details link to see a full operation outcome?
Grahame Grieve (Apr 08 2020 at 21:32):
yes. or an html presentation of that
Ilya Beda (Apr 14 2020 at 15:29):
Hi @Grahame Grieve
I implemented the first simple version of the bot.
Please join https://chat.fhir.org/#narrow/stream/233901-test-validator for bot testing. You can find example of bot usage there.
Please leave your feedback at GitHub issues https://github.com/beda-software/fhir-validator/issues
Carl Anderson (Apr 17 2020 at 14:31):
Does the Zulip bot API make it possible to interrupt someone who is asking a question in #Announcements
? Kidding. Not Kidding.
Grahame Grieve (Apr 17 2020 at 21:32):
@Tim Abbott this is actually an interesting question - have you considered it?
Tim Abbott (Apr 17 2020 at 21:45):
We do have a feature to limit who can post to #Announcements.
Tim Abbott (Apr 17 2020 at 21:47):
And there's work on making a better version of that which isn't just limiting senders to organization administrators.
René Spronk (Apr 18 2020 at 07:51):
For #announcements it would be sufficient yo only allow "frequent users" of chat.fhir.org. Those that are new are unlikely to know the our 'customary rules' when it comes to #announcements.
Josh Mandel (Apr 21 2020 at 20:36):
Agreed, that'd be really helpful @René Spronk. (Speaks to a broader concept of cred/karma, but wouldn't need to go very far in that direction.)
John Moehrke (Apr 22 2020 at 13:08):
age of account may not be perfect, but I suspect it would work much more often than not. And has a low impact on usability
Last updated: Apr 12 2022 at 19:14 UTC