Skip to content

WHOEncounterElements.cql issue with pregnant element #47

@lukeaduncan

Description

@lukeaduncan

The encounter element pregnant expression is defined as:

define "Pregnant Observation":
Elements."Pregnant Observation" O
where O.encounter.references(EncounterId)
or O.effective.toInterval() starts 9 months on or before day of AsOf

This doesn't seem to work as expected. I'm not quite sure what this syntax is doing. I tried with a few different dates in Observation.effective and never got anything to match. I'm also not sure what the "source" of this file should be.

The following will do what I think it should be doing, but I'm not sure of the requirements.

define "Pregnant Observation":
Elements."Pregnant Observation" O
where O.encounter.references(EncounterId)
or O.effective.toInterval() starts same day or after AsOf - 9 months

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions