FHIR Chat · interface to support CQL · implementers

Stream: implementers

Topic: interface to support CQL


view this post on Zulip Erich Schulz (Jun 16 2016 at 05:13):

so... I'm poking about a seeing how far I can get with a CQL -> JS transpiler

view this post on Zulip Erich Schulz (Jun 16 2016 at 05:14):

(with vision of an open-source component that will generate modules capable of running on server and in browser)

view this post on Zulip Erich Schulz (Jun 16 2016 at 05:15):

one of the requirements will be a set of module that can be injected into the transpiled CQL libraries that will handle the FHIR requests (Retrieve expressions)

view this post on Zulip Erich Schulz (Jun 16 2016 at 05:15):

the model for these requests is very tight:

view this post on Zulip Erich Schulz (Jun 16 2016 at 05:15):

"expression" : {
   "dataType" : "{http://hl7.org/fhir}Encounter",
   "type" : "Retrieve",
   "codeProperty" : "type",
   "codes" : {
      "name" : "Encounter Inpatient",
      "type" : "ValueSetRef"
   },
   "dateProperty" : "period.end.value",
   "dateRange" : {
      "name" : "Measurement Period",
      "type" : "ParameterRef"
   }

view this post on Zulip Erich Schulz (Jun 16 2016 at 05:18):

ie the retreive method will get only four basic parameters: "resource type", "coded valueset", "date range" and "patient id"

view this post on Zulip Erich Schulz (Jun 16 2016 at 05:20):

I reckon I'm about 1 & 4 months of having a transpiler that will speak pigeon CQL so I'm looking to line up a server I can poke to get interesting test data

view this post on Zulip Erich Schulz (Jun 16 2016 at 05:21):

(pigeon CQL being defined as CQL that should be aquequate for me to encode some of the clinical expressions I want for the job at hand)

view this post on Zulip Bryn Rhodes (Jun 16 2016 at 05:26):

A server loaded with known good test data would be fantastic. We've been using the various sandboxes and just loading the data on an ad-hoc basis, but something with a predictable set would be great.

view this post on Zulip Erich Schulz (Jun 16 2016 at 05:27):

and when I say "CQL to Javascript transpiler", what I really mean is "ELM/JSON -> javascript transpiler" thanks to work already done by @Bryn Rhodes etal here

view this post on Zulip Erich Schulz (Jun 16 2016 at 05:28):

I'm winning over my hospital IT team to exposing our data ponds as FHIR resources...

view this post on Zulip Erich Schulz (Jun 16 2016 at 05:28):

but that will be months (at least) away :-)

view this post on Zulip Erich Schulz (Jun 16 2016 at 05:30):

@Bryn Rhodes yes I'm thinking almost need a set of "standard patients"

view this post on Zulip Erich Schulz (Jun 16 2016 at 05:31):

"Alison Anderson" the 32 mother of 2 who is due for a pap smear

view this post on Zulip Erich Schulz (Jun 16 2016 at 05:31):

"Bruce Brannan" the 55 overweight, smoking diabetic

view this post on Zulip Erich Schulz (Jun 16 2016 at 05:32):

"Charles Clover" a 4 year-old with a snotty nose

view this post on Zulip Erich Schulz (Jun 16 2016 at 05:34):

but what I'm really looking for is wee module I can use as the basis for an injectable FHIR client to handle Retrieve operations...

view this post on Zulip Erich Schulz (Jun 16 2016 at 05:36):

this module works pretty well

view this post on Zulip Erich Schulz (Jun 16 2016 at 05:59):

I can smell awesomeness

view this post on Zulip Erich Schulz (Jun 16 2016 at 06:00):

I'm just not exactly sure if this is going to be one of those complex tasks that just melts away into "done" with a good poke... or if it is a rabbit hole

view this post on Zulip Erich Schulz (Jun 16 2016 at 06:02):

but it feels like just a case of getting a few clever, largely complete, components and just getting them to talk

view this post on Zulip Erich Schulz (Jun 16 2016 at 06:02):

but I've never written a transpiler before :-/

view this post on Zulip Erich Schulz (Jun 16 2016 at 06:09):

but I've been reading about Arden syntax and the 'curly braces problem' for decades

view this post on Zulip Erich Schulz (Jun 16 2016 at 06:10):

and it now seems very doable to make "shareable knowledge artefacts" doable - which would really set FHIR or fire

view this post on Zulip Erich Schulz (Jun 16 2016 at 06:11):

(in a good way, not in a "reduce to pile ash" way)

view this post on Zulip Erich Schulz (Jun 16 2016 at 06:11):

:-)

view this post on Zulip Erich Schulz (Jun 16 2016 at 06:16):

anyway if anyone want to assist let me know

view this post on Zulip Erich Schulz (Jun 16 2016 at 06:17):

otherwise I'll just keep chipping away

view this post on Zulip Erich Schulz (Jun 16 2016 at 06:19):

I'm wanting to a simple Retrieve interface operational early on because theres a few vague spots and its the thing that has taken 20 years to nut out

view this post on Zulip Erich Schulz (Jun 16 2016 at 06:20):

all the rest is just language details in the language (a lot of details but all seems pretty linear)

view this post on Zulip Erich Schulz (Jun 16 2016 at 06:55):

I think I have identified my first test case

view this post on Zulip Erich Schulz (Jun 16 2016 at 06:55):

https://github.com/cqframework/clinical_quality_language/blob/master/Documents/Scratch/Test.cql

view this post on Zulip Bryn Rhodes (Jun 16 2016 at 17:17):

Love the idea of an injectable Retrieve handler, that's exactly the point of the "using" statements within CQL, to support pluggable data model definitions.

view this post on Zulip Bryn Rhodes (Jun 16 2016 at 17:17):

Happy to help however I can, though JS is not my native tongue, and there's the whole 200 hours thing :)

view this post on Zulip Erich Schulz (Jun 16 2016 at 21:19):

Awesome. Help with some very simple cql scripts doing simple operations on constants would be a great help

view this post on Zulip Erich Schulz (Jun 16 2016 at 21:20):

And getting some simple stable fhir rest endpoints I could just point at would be a time saver.

view this post on Zulip Erich Schulz (Jun 16 2016 at 21:21):

I was happy with my progress yesterday and I have all day to work on it today

view this post on Zulip Bryn Rhodes (Jun 16 2016 at 21:23):

I've been using this one: http://fhirtest.uhn.ca/baseDstu3 with the 1.4 model info in the CQL 1.1 DSTU branch, it's been working flawlessly since the connectathon.

view this post on Zulip Erich Schulz (Jun 16 2016 at 21:27):

Do we have any simple cql that would make sense against that data set?

view this post on Zulip Bryn Rhodes (Jun 16 2016 at 21:33):

This one is quite simple: https://hl7-fhir.github.io/payerextract/library-cbp.cql

view this post on Zulip Erich Schulz (Jun 16 2016 at 21:59):

cool will poke that!

view this post on Zulip Erich Schulz (Jun 16 2016 at 22:00):

FYI, wip is https://bitbucket.org/erichbschulz/cql-compiler

view this post on Zulip Erich Schulz (Jun 16 2016 at 23:06):

getting a compile error :-( @Bryn Rhodes - issue here

view this post on Zulip Erich Schulz (Jun 17 2016 at 06:49):

well I'm made some JS and I can run it

view this post on Zulip Erich Schulz (Jun 17 2016 at 06:54):

which started out life as this CQL

view this post on Zulip Bryn Rhodes (Jun 17 2016 at 22:56):

That's fantastic!

view this post on Zulip Bryn Rhodes (Jun 17 2016 at 22:57):

I logged a comment on your issue report.

view this post on Zulip Erich Schulz (Jun 17 2016 at 22:57):

heya

view this post on Zulip Erich Schulz (Jun 17 2016 at 22:58):

well I just managed to get 2 solid days on it to get something to show for myself

view this post on Zulip Erich Schulz (Jun 17 2016 at 22:58):

its a big job

view this post on Zulip Erich Schulz (Jun 17 2016 at 22:58):

but I'm pretty excited about the possibilities that CQL+FHIR opens up

view this post on Zulip Erich Schulz (Jun 17 2016 at 22:59):

I'm bit of node noob myself so daresay I'll be falling into all kind of noob holes

view this post on Zulip Erich Schulz (Jun 17 2016 at 23:00):

but all seems pretty doable

view this post on Zulip Erich Schulz (Jun 17 2016 at 23:00):

I was disapointed that GELLO never made it anywhere

view this post on Zulip Erich Schulz (Jun 17 2016 at 23:01):

I tried to encourage the folk behind it to publish and open-source version of their interpreter(or whatever it was) but they didnt want to play

view this post on Zulip Grahame Grieve (Jun 17 2016 at 23:07):

I never thought that they had one. There were too many type/semantic errors in gello. After all, it's actually OCL, and I had an OCL implementation then. Such as you could (weird hybrid typing system that was only partially resolved by OCL2) but GELLO made it worse

view this post on Zulip Erich Schulz (Jun 17 2016 at 23:09):

tbh I never looked below the surface because without an available interpreter I couldn't see it flying

view this post on Zulip Erich Schulz (Jun 17 2016 at 23:09):

it is really the "shareable knowledge artefacts" that seriously floats my boat

view this post on Zulip Erich Schulz (Jun 17 2016 at 23:11):

and with the JS ecosystem becoming so mature over the last few years the possibility of being able to nail server *and* browser execution in a single chunk is pretty handy

view this post on Zulip Erich Schulz (Jun 17 2016 at 23:12):

I really shouldn't be writing a compiler :-)

view this post on Zulip Erich Schulz (Jun 17 2016 at 23:12):

it is going to be very bad :-)


Last updated: Apr 12 2022 at 19:14 UTC