Yes that works. It is also common to use the name/value attribute of the
Composition root to identify a specific composition.
Normally the name/value attribute of a templated Composition defaults to
the underlying Composition archetype croot concept name e.g 'Bericht' but
it can be renamed at template level and then queried

select a
from EHR e contains COMPOSITION a
where a/name/value ='My local composition name'

I have tended to use name/value but am coming round to using the
templateId - both are valid.


Dr Ian McNicoll
mobile +44 (0)775 209 7859
office +44 (0)1536 414994
skype: ianmcnicoll
twitter: @ianmcnicoll

Director, freshEHR Clinical Informatics Ltd.
CCIO inidus Ltd.
Co-Chair, openEHR Foundation
Hon. Senior Research Associate, CHIME, UCL

On Tue, 17 Sep 2019 at 12:44, Georg Fette <>

> Hi Ian,
> Sorry, I did not mean specifically imaging data.
> What I meant was that all our templates are based on the archetype
> My question therefore was, if the only possibility to retrieve all data
> for a specific template type is by querying with something you described:
> select a
> from EHR e contains COMPOSITION a
> where a/archetype_details/template_id/value ='My lovely template'
> Greetings
> Georg
> --
> ---------------------------------------------------------------------
> Dipl.-Inf. Georg Fette      Raum: B001
> Universität Würzburg        Tel.: +49-(0)931-31-85516
> Am Hubland                  Fax.: +49-(0)931-31-86732
> 97074 Würzburg              mail:
> ---------------------------------------------------------------------
> _______________________________________________
> openEHR-technical mailing list
openEHR-technical mailing list

Reply via email to