AQL Parser

2018-02-15 Thread Georg Fette

Hello,
What is the best (comfortable, easiest to use, most often used, most 
interoperable, etc.) implementation of an AQL parser currently available ?
After some googleling I found a Git repository of JacSoyYo. 
Alternatively I could cut the parser from the EtherCIS-Server.
Currently I am only interested in a runtime object model of AQL queries 
so I do not need an interpreter engine.

Greetings
Georg

--
-
Dipl.-Inf. Georg Fette  Raum: B001
Universität WürzburgTel.: +49-(0)931-31-85516
Am Hubland  Fax.: +49-(0)931-31-86732
97074 Würzburg  mail: georg.fe...@uni-wuerzburg.de
-


___
openEHR-technical mailing list
openEHR-technical@lists.openehr.org
http://lists.openehr.org/mailman/listinfo/openehr-technical_lists.openehr.org

AQL-parser in Java? + AQL response format (using the AS operator)

2009-03-06 Thread Erik Sundvall
Hi!

On Wed, Mar 4, 2009 at 02:54, Heath Frankel
heath.frankel at oceaninformatics.com wrote:
 Response to 2, the Ocean EhrGate Web Service provides a ResultSet as defined
 in the following WSDAL fragment:
 ? ?xs:complexType name=ResultSet
...
Thanks, I know the service interface and WSDL for Ocean EhrGate [1a,b]
since we got Ocean's permission to use it in an experimental research
application [2] I created. (For those not familiar with EhrGate an
example AQL query and response is provided further down after my
signature in this mail.)

On Wed, Mar 4, 2009 at 03:04, Heath Frankel
heath.frankel at oceaninformatics.com wrote:
 Sorry, I didn't realise when I responded to this that it was such an old
 post

No problem, I'm glad the topic comes to life again since we still
should resolve it. I think it would be wonderful to have standardised
AQL response formats for e.g. XML and JSON. The usecase I am thinking
of is not the EHR extract exchange  but rather the ability for e.g a
GUI implementation to be used with any future AQL-capable persistence
implementation (PatientOS, OSHIP, Zilics, Ocean, LiU and others
maybe?).

By the way, does AQL cater for querying CONTRIBUTIONS and FOLDERS too?

We (LiU) are working on a REST-based [3] service implementation that
we'll contribute as an inspiration for an official specification when
we have tested it. I guess the Ocean EhrGate implementation could be
an inspiration for an official SOAP based service specification. No
matter if an implementer wants to go for SOAP or REST the XML response
format could be the same (except that it in the SOAP response will be
wrapped in some extra SOAPy-envelope XML that a REST based response
won't need). It is the response format (without SOAP envelope) that
I'd be interested in further discussions about.

On Wed, Mar 4, 2009 at 02:54, Heath Frankel
heath.frankel at oceaninformatics.com wrote:
 I am very interested in the idea of basing a query result class on the
 ITEM_TABLE class
...
 In addition, it may also be necessary to have a query result class that is
 based on the ITEM_TREE class to support more complex hierarchical query
 results
...

W3C has specified a response format [4] for SPARQL queries that I
think could be used as an inspiration for an AQL-response
specification. Interested readers, please have a look at it and give
some feedback.

I have not managed to figure out how to get the result of using the
AS operator in AQL-queries visible in the result from EhrGate, the
variable binding approach in [4] might be useful in AQL responses.
In the case where AS has not been used then the path expression used
(e.g. c/context/start_time) could be returned as variable name.

So let's discuss a bit an then make a draft specification for XML
based AQL-responses :-) (JSON- and YAML-based response specifications
can follow later...)

References:
[1a] http://demo.oceanehr.com/EhrBank14/EhrService.asmx
[1b] http://demo.oceanehr.com/EhrBank14/EhrService.asmx?WSDL
[2] http://www.imt.liu.se/~erisu/2008/ehrbank/EHRBankTool.html
[3] http://en.wikipedia.org/wiki/REST
[4] http://www.w3.org/TR/rdf-sparql-XMLres/

Best regards,
Erik Sundvall
erisu at imt.liu.sehttp://www.imt.liu.se/~erisu/Tel: +46-13-227579

This query used in [2] connected to [1]...

SELECT c/context/start_time , c/name AS my_variable, c/composer/name,
v/uid/value FROM EHR[uid='fe619372-25ed-4549-a108-6ddbd92a96a7']
CONTAINS VERSION v CONTAINS COMPOSITION c WHERE
c/category/defining_code/code_string='433'

..will get a response like this (don't worry, this is a fake patient)...

RetreiveResultsResponse xmlns:xsd=http://www.w3.org/2001/XMLSchema;
xmlns=http://www.oceaninformatics.biz/OceanEhr/EhrBank/EhrService;
xmlns:soap=http://schemas.xmlsoap.org/soap/envelope/;
xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
  RetreiveResultsResult
TotalResults35/TotalResults
Rows
  ResultRow
Items
  anyType xsi:type=q1:DV_DATE_TIME
xmlns:q1=http://schemas.openehr.org/v1;
q1:value2006-12-05T13:51:55/q1:value
  /anyType
  anyType xsi:type=q2:DV_TEXT
xmlns:q2=http://schemas.openehr.org/v1;
q2:valueBlood Glucose/q2:value
  /anyType
  anyType xsi:type=xsd:stringEhrGateUnit/anyType
  anyType
xsi:type=xsd:string05c0762d-2044-4ce6-a6f3-f7bb959cda63::10aec661-5458-4ff6-8e63-c2265537196d::1/anyType
/Items
  /ResultRow

[...other results removed from example...]

/Rows
  /RetreiveResultsResult
/RetreiveResultsResponse


 -Original Message-
 From: openehr-technical-bounces at openehr.org
 [mailto:openehr-technical-bounces at openehr.org] On Behalf Of Erik Sundvall
 Sent: Tuesday, September 30, 2008 6:35 PM
 To: For openEHR technical discussions
 Subject: AQL-parser in Java? + AQL response format (using the AS operator)
...
 2. Are there any suggestions for standardised response formats? It
 would be interesting if we could query each others' implementations
 (Python

AQL-parser in Java? + AQL response format (using the AS operator)

2009-03-04 Thread Heath Frankel
Hi Erik,
Response to 2, the Ocean EhrGate Web Service provides a ResultSet as defined
in the following WSDAL fragment:

xs:complexType name=ResultSet
xs:sequence
xs:element minOccurs=0 name=name type=xs:string / 
xs:element name=totalResults type=xs:int / 
xs:element minOccurs=0 maxOccurs=unbounded name=columns
nillable=true
xs:complexType
xs:sequence
xs:element minOccurs=0 name=path
type=xs:string / 
xs:element minOccurs=0 name=name
type=xs:string / 
/xs:sequence
/xs:complexType
/xs:element
xs:element minOccurs=0 name=rows
xs:complexType
xs:sequence
xs:element minOccurs=0 maxOccurs=unbounded
name=row
xs:complexType
xs:sequence
xs:element minOccurs=0
maxOccurs=unbounded name=items nillable=true / 
/xs:sequence
/xs:complexType
/xs:element
/xs:sequence
/xs:complexType
/xs:element
/xs:sequence
/xs:complexType
 
I am very interested in the idea of basing a query result class on the
ITEM_TABLE class for consistency reasons, however ITEM_TABLE cannot be used
directly because it is limited to rows of ELEMENTs.  A query result class
needs to support rows of ANY items as is the case above.

In addition, it may also be necessary to have a query result class that is
based on the ITEM_TREE class to support more complex hierarchical query
results that are difficult to unambiguously represent using a traditional
table structure, which requires cross-join logic to be applied as mentioned
recently (sorry we have not had time to respond to that post, day-job
priorities).

Heath  


-Original Message-
From: openehr-technical-boun...@openehr.org
[mailto:openehr-technical-bounces at openehr.org] On Behalf Of Erik Sundvall
Sent: Tuesday, September 30, 2008 6:35 PM
To: For openEHR technical discussions
Subject: AQL-parser in Java? + AQL response format (using the AS operator)

Hi!

1. Has anybody planned, or started, to create an AQL-parser in Java?

Maybe the basics from AQL to parse tree could be common for several
different persistence implementations and then the rest of the
implementation will be different for different persistence mechanisms.

Our first interest will be in transforming AQL queries to queries
against an XML-database containing versioned Compositions. (It's for
an educational system where performance isn't crucial.)

2. Are there any suggestions for standardised response formats? It
would be interesting if we could query each others' implementations
(Python and various Java based ones) and interpret the response :-)

When returning entire openEHR subtrees (an entire Composition or Entry
for example) I guess the current XML-format could be used to start
with. The response is likely to often be a list of such subtrees and
the format of that list Would need to be standardised.

Another case is when using the AS operator, how do we in a
standardised way identify the named parts.

Best regards,
Erik Sundvall
erisu at imt.liu.sehttp://www.imt.liu.se/~erisu/Tel: +46-13-227579
___
openEHR-technical mailing list
openEHR-technical at openehr.org
http://lists.chime.ucl.ac.uk/mailman/listinfo/openehr-technical




AQL-parser in Java? + AQL response format (using the AS operator)

2009-03-04 Thread Heath Frankel
Sorry, I didn't realise when I responded to this that it was such an old
post (having email management problems).  Anyway, it seems to be current hot
topic so it probably won't go to waste.

Heath


-Original Message-
From: Heath Frankel [mailto:heath.fran...@oceaninformatics.com] 
Sent: Wednesday, March 04, 2009 12:25 PM
To: 'erisu at imt.liu.se'; 'For openEHR technical discussions'
Subject: RE: AQL-parser in Java? + AQL response format (using the AS
operator)

Hi Erik,
Response to 2, the Ocean EhrGate Web Service provides a ResultSet as defined
in the following WSDAL fragment:

xs:complexType name=ResultSet
xs:sequence
xs:element minOccurs=0 name=name type=xs:string / 
xs:element name=totalResults type=xs:int / 
xs:element minOccurs=0 maxOccurs=unbounded name=columns
nillable=true
xs:complexType
xs:sequence
xs:element minOccurs=0 name=path
type=xs:string / 
xs:element minOccurs=0 name=name
type=xs:string / 
/xs:sequence
/xs:complexType
/xs:element
xs:element minOccurs=0 name=rows
xs:complexType
xs:sequence
xs:element minOccurs=0 maxOccurs=unbounded
name=row
xs:complexType
xs:sequence
xs:element minOccurs=0
maxOccurs=unbounded name=items nillable=true / 
/xs:sequence
/xs:complexType
/xs:element
/xs:sequence
/xs:complexType
/xs:element
/xs:sequence
/xs:complexType
 
I am very interested in the idea of basing a query result class on the
ITEM_TABLE class for consistency reasons, however ITEM_TABLE cannot be used
directly because it is limited to rows of ELEMENTs.  A query result class
needs to support rows of ANY items as is the case above.

In addition, it may also be necessary to have a query result class that is
based on the ITEM_TREE class to support more complex hierarchical query
results that are difficult to unambiguously represent using a traditional
table structure, which requires cross-join logic to be applied as mentioned
recently (sorry we have not had time to respond to that post, day-job
priorities).

Heath  


-Original Message-
From: openehr-technical-boun...@openehr.org
[mailto:openehr-technical-bounces at openehr.org] On Behalf Of Erik Sundvall
Sent: Tuesday, September 30, 2008 6:35 PM
To: For openEHR technical discussions
Subject: AQL-parser in Java? + AQL response format (using the AS operator)

Hi!

1. Has anybody planned, or started, to create an AQL-parser in Java?

Maybe the basics from AQL to parse tree could be common for several
different persistence implementations and then the rest of the
implementation will be different for different persistence mechanisms.

Our first interest will be in transforming AQL queries to queries
against an XML-database containing versioned Compositions. (It's for
an educational system where performance isn't crucial.)

2. Are there any suggestions for standardised response formats? It
would be interesting if we could query each others' implementations
(Python and various Java based ones) and interpret the response :-)

When returning entire openEHR subtrees (an entire Composition or Entry
for example) I guess the current XML-format could be used to start
with. The response is likely to often be a list of such subtrees and
the format of that list Would need to be standardised.

Another case is when using the AS operator, how do we in a
standardised way identify the named parts.

Best regards,
Erik Sundvall
erisu at imt.liu.sehttp://www.imt.liu.se/~erisu/Tel: +46-13-227579
___
openEHR-technical mailing list
openEHR-technical at openehr.org
http://lists.chime.ucl.ac.uk/mailman/listinfo/openehr-technical




AQL-parser in Java? + AQL response format (using the AS operator)

2008-09-30 Thread Erik Sundvall
Hi!

1. Has anybody planned, or started, to create an AQL-parser in Java?

Maybe the basics from AQL to parse tree could be common for several
different persistence implementations and then the rest of the
implementation will be different for different persistence mechanisms.

Our first interest will be in transforming AQL queries to queries
against an XML-database containing versioned Compositions. (It's for
an educational system where performance isn't crucial.)

2. Are there any suggestions for standardised response formats? It
would be interesting if we could query each others' implementations
(Python and various Java based ones) and interpret the response :-)

When returning entire openEHR subtrees (an entire Composition or Entry
for example) I guess the current XML-format could be used to start
with. The response is likely to often be a list of such subtrees and
the format of that list Would need to be standardised.

Another case is when using the AS operator, how do we in a
standardised way identify the named parts.

Best regards,
Erik Sundvall
erisu at imt.liu.sehttp://www.imt.liu.se/~erisu/Tel: +46-13-227579



AQL-parser in Java? + AQL response format (using the AS operator)

2008-09-30 Thread Tim Cook
Hi Eric,

I suggest that you read the Extract Information Model document.
Though it still needs some vetting, this should answer many of your
questions.

Regards,
Tim




On Tue, 2008-09-30 at 11:04 +0200, Erik Sundvall wrote:
 Hi!
 
 1. Has anybody planned, or started, to create an AQL-parser in Java?
 
 Maybe the basics from AQL to parse tree could be common for several
 different persistence implementations and then the rest of the
 implementation will be different for different persistence mechanisms.
 
 Our first interest will be in transforming AQL queries to queries
 against an XML-database containing versioned Compositions. (It's for
 an educational system where performance isn't crucial.)
 
 2. Are there any suggestions for standardised response formats? It
 would be interesting if we could query each others' implementations
 (Python and various Java based ones) and interpret the response :-)
 
 When returning entire openEHR subtrees (an entire Composition or Entry
 for example) I guess the current XML-format could be used to start
 with. The response is likely to often be a list of such subtrees and
 the format of that list Would need to be standardised.
 
 Another case is when using the AS operator, how do we in a
 standardised way identify the named parts.
 
 Best regards,
 Erik Sundvall
 erisu at imt.liu.sehttp://www.imt.liu.se/~erisu/Tel: +46-13-227579
 ___
 openEHR-technical mailing list
 openEHR-technical at openehr.org
 http://lists.chime.ucl.ac.uk/mailman/listinfo/openehr-technical
-- 
Timothy Cook, MSc
Health Informatics Research  Development Services
LinkedIn Profile:http://www.linkedin.com/in/timothywaynecook 
Skype ID == timothy.cook 
**
*You may get my Public GPG key from  popular keyservers or   *
*from this link http://timothywayne.cook.googlepages.com/home*
**