OpenEHR Demographic is used to represent the party and party relationships. I want to know if AQL spec can support demographic query?
The AQL specification is agnostic to the reference model. Then the rest depends on if the implementations support demographic queries or not.
The longer term way to make this happen is for AQL query processors to use computable representations of the Reference Model whose instances they are intended to query over, e.g. the BMM models already in use by various archetyping tools (or it could be XMI, or something else). We are not there yet, but the path in principle seems clear enough.
…meanwhile the answer here is that AQL spec is not yet addressing explicitly the Demographic RM. There are no examples or guidance on how such party - party relationship query may look like. However, there are (working)groups interested in exploring this topic, so feel free suggest or discuss more in detail.