Ward Weistra Profile picture
Part of @FirelyTeam πŸ”₯ πŸ‘·β€β™‚οΈ Product Manager #FHIR data modelling, incl. https://t.co/W0CzPfb1Cn πŸ‘¨β€πŸ« Content lead #FHIRDevDays πŸŽ“ MSc Bioinformatics

Dec 1, 2022, 11 tweets

These #AI text generation algorithms are getting scarily good at general code, blogs and poems. But does it work on something so niche as @HL7 #FHIR?

My testing below πŸ‘‡

Let's start simple, please generate me a #FHIR patient resource with a name and birth date. And yes βœ… it generates a flawless Patient instance with a name and birthDate value (that validates with no issues: simplifier.net/snippet/wardwe…)

It even includes some extra explanation...

Let's make it a bit harder.

This algorithm remembers our previous conversation, so we can just continue with asking it to add an extension for capturing the patient's 'Race' value, for which the US Core IG has a common extension: hl7.org/fhir/us/core/S… πŸ‘‡

The generated example (simplifier.net/snippet/wardwe…) messes up the canonical for the extension and code system (just a bit, but that's problematic for an identifier 😁), but the code and display match and the V3 Race CodeSystem (terminology.hl7.org/CodeSystem/v3-…) is appropriate.

Another step up, let's ask for the newer #FHIR Shorthand representation. Now it goes off the rails on format, a #FSH representation would look something more like this: bit.ly/fsh-patient

With its #YAML-ish formatting, it reminds me more of YAMLgen: bit.ly/yaml-patient

Going back to regular FHIR formats, it almost hits a homerun on my request to create a #FHIR ValueSet with all @SnomedCT codes related to knee pain 🀯

All I had to do was add 'status=active' to make this a perfectly valid ValueSet: simplifier.net/snippet/wardwe…

Back to the esoteric: I'm not aware of many implemented #GraphQL #FHIR servers. But I'm happy to learn more, so please show me how to query! πŸ•ΈοΈ

And yes, is seems to give me a perfectly valid query and an example of the data that would come back.

@GrahameGrieve @UriGoldshtein?

Interestingly, the second time I asked (deeper into the conversation) it also included an extension in there. Probably because I've previously asked to include that in some profiles πŸ‘

Asking for a query on all blood pressure observations it takes a free-text approach πŸ˜…

Can it write my Implementation Guide, the human readable documentation around a resource?

Yes, but it kinda seems to give up half-way 😬 After 'Clinical Information' and it doesn't even bother to finish the JSON example. A known issue with these algorithms, afaik.

#ILCore #FHIR

Ok, finally then: Some #FHIR code generation? After a few tries, this looks quite legit to connect to a #SMARTonFHIR server with the @FirelyTeam .NET SDK

I really have no clue, but it looks real enough πŸ€“. @GinoCanessa @SgtPos @ewoutkramer?

That's all for now in the adventures of #gptchat and #FHIR. Try it for yourself at chat.openai.com and let me know what you find!

If you enjoyed this thread, please:
1. Follow me @WardWeistra for more
2. RT the tweet below to share this thread

Share this Scrolly Tale with your friends.

A Scrolly Tale is a new way to read Twitter threads with a more visually immersive experience.
Discover more beautiful Scrolly Tales like this.

Keep scrolling