{
  "resourceType": "StructureDefinition",
  "id": "shr-core-GeneralizedAge-extension",
  "text": {
    "status": "generated",
    "div": "<div xmlns=\"http://www.w3.org/1999/xhtml\">\n  <p><b>SHR GeneralizedAge Extension</b></p>\n  <p>Qualitative or quantitative, exact or inexact description of age.</p>\n</div>"
  },
  "url": "http://standardhealthrecord.org/fhir/StructureDefinition/shr-core-GeneralizedAge-extension",
  "identifier": [
    {
      "system": "http://standardhealthrecord.org",
      "value": "shr.core.GeneralizedAge"
    }
  ],
  "version": "0.0.1",
  "name": "SHR GeneralizedAge Extension",
  "title": "SHR GeneralizedAge Extension",
  "status": "draft",
  "date": "2017-12-20",
  "publisher": "The MITRE Corporation: Standard Health Record Collaborative",
  "contact": [
    {
      "telecom": [
        {
          "system": "url",
          "value": "http://standardhealthrecord.org"
        }
      ]
    }
  ],
  "description": "Qualitative or quantitative, exact or inexact description of age.",
  "fhirVersion": "3.0.1",
  "kind": "complex-type",
  "abstract": false,
  "contextType": "resource",
  "context": [
    "*"
  ],
  "type": "Extension",
  "baseDefinition": "http://hl7.org/fhir/StructureDefinition/Extension",
  "derivation": "constraint",
  "differential": {
    "element": [
      {
        "id": "Extension:generalizedage",
        "path": "Extension",
        "short": "SHR GeneralizedAge Extension",
        "definition": "Qualitative or quantitative, exact or inexact description of age.",
        "min": 0,
        "max": "*",
        "constraint": [
          {
            "key": "choice-1",
            "severity": "error",
            "human": "shr-core-GeneralizedAge-extension SHALL have either extension('age') or extension('agerange') or extension('agegroup')",
            "expression": "( extension('age').url | extension('agerange').url | extension('agegroup').url ).distinct().count() == 1"
          }
        ]
      },
      {
        "id": "Extension:generalizedage.extension:age",
        "path": "Extension.extension",
        "sliceName": "age",
        "definition": "How long something has existed in time.",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": "http://standardhealthrecord.org/fhir/StructureDefinition/shr-core-Age-extension"
          }
        ]
      },
      {
        "id": "Extension:generalizedage.extension:agerange",
        "path": "Extension.extension",
        "sliceName": "agerange",
        "definition": "A quantitative range of ages. One of the two ages must be specified.",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": "http://standardhealthrecord.org/fhir/StructureDefinition/shr-core-AgeRange-extension"
          }
        ]
      },
      {
        "id": "Extension:generalizedage.extension:agegroup",
        "path": "Extension.extension",
        "sliceName": "agegroup",
        "definition": "Subgroups of populations based on age.",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": "http://standardhealthrecord.org/fhir/StructureDefinition/shr-core-AgeGroup-extension"
          }
        ]
      },
      {
        "id": "Extension:generalizedage.url",
        "path": "Extension.url",
        "type": [
          {
            "code": "uri"
          }
        ],
        "fixedUri": "http://standardhealthrecord.org/fhir/StructureDefinition/shr-core-GeneralizedAge-extension"
      },
      {
        "id": "Extension:generalizedage.value[x]",
        "path": "Extension.value[x]",
        "min": 0,
        "max": "0"
      }
    ]
  }
}