TuftsCTSI / TRDW.jl

This is a Pluto environment with FunSQL for use in Research Requests
Other
2 stars 0 forks source link

Attach and other fixes #70

Closed xitology closed 8 months ago

xitology commented 8 months ago
@funsql begin
    person()
    attach_earliest(
        earliest_bmi => measurement(LOINC("39156-5", "Body mass index (BMI) [Ratio]")))
    attach_latest(
        latest_bmi => measurement(LOINC("39156-5", "Body mass index (BMI) [Ratio]")))
    select(
        person_id,
        earliest_bmi_datetime => earliest_bmi.datetime,
        earliest_bmi_value => earliest_bmi.value_as_number,
        latest_bmi_datetime => latest_bmi.datetime,
        latest_bmi_value => latest_bmi.value_as_number)
end

Just like group_with() and filter_with(), they also accept an optional predicate parameter.