{
  "Title": "New users of a class A or class B antihyperglycaemic",
  "Description": "Index cohort for an active-comparator new-user study. First qualifying exposure to either study class defines index (cohort_start_date); each inclusion rule is one step of the attrition waterfall. Replace the concept-set items and the windows with the study's own definitions.",
  "cdmVersionRange": ">=5.0.0",
  "ConceptSets": [
    {
      "id": 0,
      "name": "Class A or class B antihyperglycaemic",
      "expression": {
        "items": [
          {
            "concept": {
              "CONCEPT_ID": 1503297,
              "CONCEPT_NAME": "metformin",
              "STANDARD_CONCEPT": "S",
              "INVALID_REASON": "V",
              "DOMAIN_ID": "Drug",
              "VOCABULARY_ID": "RxNorm",
              "CONCEPT_CLASS_ID": "Ingredient"
            },
            "isExcluded": false,
            "includeDescendants": true,
            "includeMapped": false
          },
          {
            "concept": {
              "CONCEPT_ID": 1560171,
              "CONCEPT_NAME": "glipizide",
              "STANDARD_CONCEPT": "S",
              "INVALID_REASON": "V",
              "DOMAIN_ID": "Drug",
              "VOCABULARY_ID": "RxNorm",
              "CONCEPT_CLASS_ID": "Ingredient"
            },
            "isExcluded": false,
            "includeDescendants": true,
            "includeMapped": false
          }
        ]
      }
    }
  ],
  "PrimaryCriteria": {
    "CriteriaList": [
      {
        "DrugExposure": {
          "CodesetId": 0,
          "First": true,
          "AgeAtStart": {
            "Value": 18,
            "Op": "gte"
          }
        }
      }
    ],
    "ObservationWindow": {
      "PriorDays": 365,
      "PostDays": 0
    },
    "PrimaryCriteriaLimit": {
      "Type": "First"
    }
  },
  "AdditionalCriteria": {
    "Type": "ALL",
    "CriteriaList": [],
    "DemographicCriteriaList": [],
    "Groups": []
  },
  "InclusionRules": [
    {
      "name": "Continuous enrolment for 365 days before index",
      "description": "The subject must have an observation period covering the 365 days before index, so baseline covariates and the prior-use rule are observable.",
      "expression": {
        "Type": "ALL",
        "CriteriaList": [
          {
            "Criteria": {
              "ObservationPeriod": {
                "First": false
              }
            },
            "StartWindow": {
              "Start": {
                "Coeff": -1
              },
              "End": {
                "Coeff": 0
              },
              "UseIndexEnd": false,
              "UseEventEnd": false
            },
            "Occurrence": {
              "Type": 2,
              "Count": 1,
              "IsDistinct": false
            }
          }
        ]
      }
    },
    {
      "name": "No study-class dispensing in the 365 days before index",
      "description": "New-user rule: any prior dispensing of a class A or class B drug disqualifies the subject.",
      "expression": {
        "Type": "ALL",
        "CriteriaList": [
          {
            "Criteria": {
              "DrugExposure": {
                "CodesetId": 0,
                "First": false
              }
            },
            "StartWindow": {
              "Start": {
                "Coeff": -365
              },
              "End": {
                "Coeff": -1
              },
              "UseIndexEnd": false,
              "UseEventEnd": false
            },
            "Occurrence": {
              "Type": 0,
              "Count": 0,
              "IsDistinct": false
            }
          }
        ]
      }
    }
  ],
  "QualifiedLimit": {
    "Type": "First"
  },
  "ExpressionLimit": {
    "Type": "All"
  },
  "CensoringCriteria": [],
  "CollapseSettings": {
    "CollapseType": "ERA",
    "EraPad": 0
  }
}
