Skip to content
This repository has been archived by the owner on Dec 18, 2023. It is now read-only.

min_date_value and max_date_value are treated as NUMERIC #8

Open
wardweistra opened this issue May 4, 2019 · 0 comments
Open

min_date_value and max_date_value are treated as NUMERIC #8

wardweistra opened this issue May 4, 2019 · 0 comments

Comments

@wardweistra
Copy link
Contributor

Call:
api.new_constraint(concept='Demographics:BIRTHDATE', max_date_value='1-1-1980')
Is translated to:

{  
   "type":"and",
   "args":[  
      {  
         "type":"concept",
         "conceptCode":"Demographics:BIRTHDATE"
      },
      {  
         "type":"value",
         "valueType":"NUMERIC",
         "operator":"<=",
         "value":315615599999.0
      }
   ]
}

This returns 0 patients.

While Glowing Bear translates this to (excluding the patient subselection):

{  
   "type":"and",
   "args":[  
      {  
         "type":"concept",
         "conceptCode":"Demographics:BIRTHDATE"
      },
      {  
         "type":"time",
         "field":{  
            "dimension":"value",
            "fieldName":"numberValue",
            "type":"DATE"
         },
         "operator":">=",
         "values":[  
            "1950-01-01T00:00:01.000Z"
         ]
      }
   ]
}

Code treats is as numerical value, not date:

class MinDateValueConstraint(MinValueConstraint):

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant