Support constants in SELECT

Description

Most SQL-like languages have the ability of returning constants as results of the query. It could be useful for CDSS-like queries. e.g.

SELECT "true" as dangerousBP
FROM EHR [ehr_id/value=$ehrUid] CONTAINS COMPOSITION [openEHR-EHR-COMPOSITION.encounter.v1]
CONTAINS OBSERVATION obs [openEHR-EHR-OBSERVATION.blood_pressure.v1]

WHERE obs/data[at0001]/events[at0006]/data[at0003]/items[at0004]/value/magnitude>= 180 OR
obs/data[at0001]/events[at0006]/data[at0003]/items[at0005]/value/magnitude>= 40

Bostjan: already implemented in Think!EHR
SA: could be done by a function 'const'?

Reporter

Diego Bosca

Components

Affects versions

Configure