{
  "ConceptSets": [
    {
      "id": 0,
      "name": "Diabetes mellitus (all types)",
      "expression": {
        "items": [
          {
            "concept": {
              "CONCEPT_ID": 201820,
              "CONCEPT_NAME": "Diabetes mellitus",
              "STANDARD_CONCEPT": "S",
              "STANDARD_CONCEPT_CAPTION": "Standard",
              "INVALID_REASON": "V",
              "INVALID_REASON_CAPTION": "Valid",
              "CONCEPT_CODE": "73211009",
              "DOMAIN_ID": "Condition",
              "VOCABULARY_ID": "SNOMED",
              "CONCEPT_CLASS_ID": "Clinical Finding"
            },
            "isExcluded": false,
            "includeDescendants": true,
            "includeMapped": false
          }
        ]
      }
    },
    {
      "id": 1,
      "name": "Metformin",
      "expression": {
        "items": [
          {
            "concept": {
              "CONCEPT_ID": 1503297,
              "CONCEPT_NAME": "metformin",
              "STANDARD_CONCEPT": "S",
              "STANDARD_CONCEPT_CAPTION": "Standard",
              "INVALID_REASON": "V",
              "INVALID_REASON_CAPTION": "Valid",
              "CONCEPT_CODE": "6809",
              "DOMAIN_ID": "Drug",
              "VOCABULARY_ID": "RxNorm",
              "CONCEPT_CLASS_ID": "Ingredient"
            },
            "isExcluded": false,
            "includeDescendants": true,
            "includeMapped": false
          }
        ]
      }
    }
  ],
  "PrimaryCriteria": {
    "CriteriaList": [
      {
        "ConditionOccurrence": {
          "CodesetId": 0
        }
      }
    ],
    "ObservationWindow": {
      "PriorDays": 0,
      "PostDays": 0
    },
    "PrimaryCriteriaLimit": {
      "Type": "First"
    }
  },
  "QualifiedLimit": {
    "Type": "First"
  },
  "ExpressionLimit": {
    "Type": "First"
  },
  "InclusionRules": [
    {
      "name": "Female of childbearing age (15-44) at first diabetes record",
      "description": "This is the collapse trigger. On SynPUF (synthetic Medicare, mostly 65+) this rule empties the cohort even though diabetes is abundant, which demonstrates a population problem rather than a concept problem.",
      "expression": {
        "Type": "ALL",
        "CriteriaList": [],
        "DemographicCriteriaList": [
          {
            "Age": {
              "Value": 15,
              "Extent": 44,
              "Op": "bt"
            },
            "Gender": [
              {
                "CONCEPT_ID": 8532,
                "CONCEPT_NAME": "FEMALE",
                "STANDARD_CONCEPT": "S",
                "STANDARD_CONCEPT_CAPTION": "Standard",
                "INVALID_REASON": "V",
                "INVALID_REASON_CAPTION": "Valid",
                "CONCEPT_CODE": "F",
                "DOMAIN_ID": "Gender",
                "VOCABULARY_ID": "Gender",
                "CONCEPT_CLASS_ID": "Gender"
              }
            ]
          }
        ],
        "Groups": []
      }
    },
    {
      "name": "Optional exposure preview: any metformin (demonstrates the exposure arm)",
      "description": "Optional. Shows how an exposure requirement would be added. Not required to see the collapse.",
      "expression": {
        "Type": "ALL",
        "CriteriaList": [
          {
            "Criteria": {
              "DrugExposure": {
                "CodesetId": 1
              }
            },
            "StartWindow": {
              "Start": {
                "Coeff": -1
              },
              "End": {
                "Coeff": 1
              },
              "UseEventEnd": false
            },
            "Occurrence": {
              "Type": 2,
              "Count": 1
            }
          }
        ],
        "DemographicCriteriaList": [],
        "Groups": []
      }
    }
  ],
  "CensoringCriteria": [],
  "CollapseSettings": {
    "CollapseType": "ERA",
    "EraPad": 0
  },
  "CensorWindow": {},
  "cdmVersionRange": ">=5.0.0"
}
