{
  "resourceType": "StructureDefinition",
  "id": "presence-indicator-extension",
  "url": "http://vha.gov/fhir/StructureDefinition/presence-indicator-extension",
  "name": "presence-indicator-extension",
  "status": "draft",
  "fhirVersion": "3.0.1",
  "kind": "complex-type",
  "abstract": false,
  "contextType": "datatype",
  "context": [
    "Condition",
    "Observation",
    "BackboneElement"
  ],
  "type": "Extension",
  "baseDefinition": "http://hl7.org/fhir/StructureDefinition/Extension",
  "derivation": "constraint",
  "snapshot": {},
  "differential": {
    "element": [
      {
        "id": "Extension",
        "path": "Extension",
        "short": "Presence Indicator Extension",
        "definition": "Indicates whether a condition is present, absent, or indeterminate.  Used to support formal negation of clinical statements encoded using the us-core-problem-va profile and the observation-va profile.  Note that this extension is necessarily a modifier extension because a value of \"absent\" is equivalent to negating the clinical statement.",
        "comment": "The presenceIndScope component designates the path(s) of the data element(s) to which the presenceIndValue applies.\r\nThe presenceIndValue component indicates whether the information collectively designated by the presenceIndScope is \"present\", \"absent\", or \"indeterminate\".  Note that this extension alone should be used to negate clinical statements.  As a result, the \"code\" data element cannot contain coded concepts that intrinsically negate a statement (such as \"No history of asthma\"), and the \"value\" data element explicitly excludes use of the valueBoolean data type.",
        "max": "1",
        "isModifier": true
      },
      {
        "id": "Extension.extension",
        "path": "Extension.extension",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "url"
            }
          ],
          "rules": "open"
        }
      },
      {
        "id": "Extension.extension:presenceIndValue",
        "path": "Extension.extension",
        "sliceName": "presenceIndValue",
        "short": "Presence Indicator Value",
        "definition": "Denotes whether the information specified in the Presence Indicator Scope element is present (\"PR\"), absent (\"AB\"), or \"indeterminate (\"IN\").  These values provide the basis for the formal representation of negation with respect to clinical statements (refer to the KBS whitepaper on quantified negation).",
        "comment": "Note:  The values of \"clinicalStatus\" and \"verificationStatus\" (for conditions) must be consistent with that of presenceIndValue if any combination of these data elements is populated.  Specifically, the following mapping should hold:\r\n\r\npresenceIndStatus ------------ clinicalStatus ------------------------------verificationStatus                                                         \r\nPR_______________________active, recurrence__________________confirmed                                                                     \r\nAB_______________________inactive, remission, resolved__________refuted                                                                          \r\nIN_______________________<n/a>____________________________provisional, differential, unknown, entered-in-error",
        "min": 1,
        "max": "1"
      },
      {
        "id": "Extension.extension:presenceIndValue.url",
        "path": "Extension.extension.url",
        "fixedUri": "presenceIndValue"
      },
      {
        "id": "Extension.extension:presenceIndValue.value[x]:valueCode",
        "path": "Extension.extension.valueCode",
        "sliceName": "valueCode",
        "short": "present | absent | indeterminate",
        "definition": "Optionally indicates status of the clinical statement.  If populated, presenceIndScope value must be also populated.",
        "min": 1,
        "type": [
          {
            "code": "code"
          }
        ],
        "binding": {
          "strength": "required",
          "description": "Value set for Presence Indicator",
          "valueSetReference": {
            "reference": "http://vha.gov/fhir/ValueSet/presence-indicator"
          }
        }
      },
      {
        "id": "Extension.extension:presenceIndScope",
        "path": "Extension.extension",
        "sliceName": "presenceIndScope",
        "short": "Presence Indicator Scope",
        "definition": "The scope of the resource instance to which the presenceIndValue applies.  The value(s) must be denoted as XPath or JSONPath expressions (depending on which encoding system is used for the resource instance).  The values of the path denotations must be relative to the presenceIndScope/valueString element.",
        "comment": "Example of valid path values:\r\n\"../../../code\"\r\n\"../../../bodySite\"\r\n\r\nNote:  The data elements \"clinicalStatus\" and \"verificationStatus\" may not be included within the presence indicator scope, because this would potentially result in \"double negative\" representations.",
        "min": 1
      },
      {
        "id": "Extension.extension:presenceIndScope.url",
        "path": "Extension.extension.url",
        "fixedUri": "presenceIndScope"
      },
      {
        "id": "Extension.extension:presenceIndScope.value[x]:valueString",
        "path": "Extension.extension.valueString",
        "sliceName": "valueString",
        "short": "A path expression within the current resource",
        "definition": "Indicates a root node within a sub-tree of the current resource.  The sub-tree is included in the scope of the presence indicator (perhaps with other sub-trees specified in additional instances of \"presenceIndScope\").",
        "comment": "Must be an XPath or JSONPath expression, relative to the current node (i.e., relative to Extension.extension:presenceIndScope.valueString)",
        "min": 1,
        "type": [
          {
            "code": "string"
          }
        ]
      },
      {
        "id": "Extension.url",
        "path": "Extension.url",
        "fixedUri": "http://vha.gov/fhir/StructureDefinition/presence-indicator-extension"
      },
      {
        "id": "Extension.value[x]",
        "path": "Extension.value[x]",
        "max": "0"
      }
    ]
  }
}