OHDSI Home | Forums | Wiki | Github

Designing restrictVisit criteria

(Elena Villalon) #1

I want to model something like
PrimaryCriteria : Carpal Tunnel (codesetid=1)
Additional concept Electromyogram neurological test (codessetid=2)
but I want them to happen in the same encounter or visit.
My question is if I should add an AdditionalCriteria so that codesetid=1 has RestrictVisit=true as I cannot put it in the Primary Criteria rules. Then I add either in AdditionalCriteria or InclusionRules the codesetid=2 also with RestricVisit=true

Alternatively, I could add codesetId=2 in the PrimariCriteria as an Attribute/ add nested Criteria like
“PrimaryCriteria”: {
“CriteriaList”: [
“ProcedureOccurrence”: {
“CorrelatedCriteria”: {
“Type”: “AT_LEAST”,
“Count”: 1,
“CriteriaList”: [
{ProcedureOccurrence Electromyogram
“DemographicCriteriaList”: [],
“Groups”: []
“CodesetId”: 1

So it goes as a nested CorelatedCriteria instead of putting it as InclusionRule with RestrictVisit=true.
Are the two approaches equivalent and which one is best

(Chris Knoll) #2

Logically, it will work out the same.

The reason for putting something into additional criteria is that you have multiple Primary Criteria, and you want all of those primary criteria to apply the same additional criteria. This is helpful if you have 5 primary criteria and you just want to define the additional criteria once.

The reason for putting it into nested criteria is that if you had 5 primary criteria and they have different additional criteria for each one. In that case, you’d put a nested criteria for each of the Primary criteria, and specify the different additional criteria within each nested criteria.