In multi-source queries, is it feasible to specify the type of attributes to be returned?
Yes, you can use “return” to specify the type of attributes, because it is an arbitrary expression.
For example:
define "Encounter with Assessment Result":
from
"Valid Encounter" Encounter,
["Assessment, Performed": "Specified Assessment"] Assessment
where Assessment.result in "Specified Assessment Result Valueset"
and Assessment.relevantDatetime during Encounter.relevantPeriod
return Encounter