Stream: implementers
Topic: interface to support CQL
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
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)
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)
Erich Schulz (Jun 16 2016 at 05:15):
the model for these requests is very tight:
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" }
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"
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
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)
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.
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
Erich Schulz (Jun 16 2016 at 05:28):
I'm winning over my hospital IT team to exposing our data ponds as FHIR resources...
Erich Schulz (Jun 16 2016 at 05:28):
but that will be months (at least) away :-)
Erich Schulz (Jun 16 2016 at 05:30):
@Bryn Rhodes yes I'm thinking almost need a set of "standard patients"
Erich Schulz (Jun 16 2016 at 05:31):
"Alison Anderson" the 32 mother of 2 who is due for a pap smear
Erich Schulz (Jun 16 2016 at 05:31):
"Bruce Brannan" the 55 overweight, smoking diabetic
Erich Schulz (Jun 16 2016 at 05:32):
"Charles Clover" a 4 year-old with a snotty nose
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...
Erich Schulz (Jun 16 2016 at 05:36):
this module works pretty well
Erich Schulz (Jun 16 2016 at 05:59):
I can smell awesomeness
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
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
Erich Schulz (Jun 16 2016 at 06:02):
but I've never written a transpiler before :-/
Erich Schulz (Jun 16 2016 at 06:09):
but I've been reading about Arden syntax and the 'curly braces problem' for decades
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
Erich Schulz (Jun 16 2016 at 06:11):
(in a good way, not in a "reduce to pile ash" way)
Erich Schulz (Jun 16 2016 at 06:11):
:-)
Erich Schulz (Jun 16 2016 at 06:16):
anyway if anyone want to assist let me know
Erich Schulz (Jun 16 2016 at 06:17):
otherwise I'll just keep chipping away
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
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)
Erich Schulz (Jun 16 2016 at 06:55):
I think I have identified my first test case
Erich Schulz (Jun 16 2016 at 06:55):
https://github.com/cqframework/clinical_quality_language/blob/master/Documents/Scratch/Test.cql
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.
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 :)
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
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.
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
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.
Erich Schulz (Jun 16 2016 at 21:27):
Do we have any simple cql that would make sense against that data set?
Bryn Rhodes (Jun 16 2016 at 21:33):
This one is quite simple: https://hl7-fhir.github.io/payerextract/library-cbp.cql
Erich Schulz (Jun 16 2016 at 21:59):
cool will poke that!
Erich Schulz (Jun 16 2016 at 22:00):
FYI, wip is https://bitbucket.org/erichbschulz/cql-compiler
Erich Schulz (Jun 16 2016 at 23:06):
getting a compile error :-( @Bryn Rhodes - issue here
Erich Schulz (Jun 17 2016 at 06:49):
well I'm made some JS and I can run it
Erich Schulz (Jun 17 2016 at 06:54):
which started out life as this CQL
Bryn Rhodes (Jun 17 2016 at 22:56):
That's fantastic!
Bryn Rhodes (Jun 17 2016 at 22:57):
I logged a comment on your issue report.
Erich Schulz (Jun 17 2016 at 22:57):
heya
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
Erich Schulz (Jun 17 2016 at 22:58):
its a big job
Erich Schulz (Jun 17 2016 at 22:58):
but I'm pretty excited about the possibilities that CQL+FHIR opens up
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
Erich Schulz (Jun 17 2016 at 23:00):
but all seems pretty doable
Erich Schulz (Jun 17 2016 at 23:00):
I was disapointed that GELLO never made it anywhere
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
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
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
Erich Schulz (Jun 17 2016 at 23:09):
it is really the "shareable knowledge artefacts" that seriously floats my boat
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
Erich Schulz (Jun 17 2016 at 23:12):
I really shouldn't be writing a compiler :-)
Erich Schulz (Jun 17 2016 at 23:12):
it is going to be very bad :-)
Last updated: Apr 12 2022 at 19:14 UTC