{
  "resourceType": "StructureDefinition",
  "url": "https://bpcs.exchange/fhir/StructureDefinition/profile-Observation-document-base",
  "name": "ObservationDocumentBase",
  "status": "draft",
  "fhirVersion": "5.0.0",
  "kind": "resource",
  "abstract": false,
  "type": "Observation",
  "baseDefinition": "http://hl7.org/fhir/StructureDefinition/Observation",
  "derivation": "constraint",
  "differential": {
    "element": [
      {
        "id": "Observation.extension:observationReceivedDate",
        "path": "Observation.extension",
        "sliceName": "observationReceivedDate",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "https://bpcs.exchange/fhir/StructureDefinition/ext-Observation-ReceivedDate"
            ]
          }
        ],
        "mustSupport": true
      },
      {
        "id": "Observation.category",
        "path": "Observation.category",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "$this"
            }
          ],
          "rules": "open"
        },
        "short": "This is a 'document'",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "Observation.category:document",
        "path": "Observation.category",
        "sliceName": "document",
        "short": "This is a 'document'",
        "min": 1,
        "max": "1",
        "patternCodeableConcept": {
          "coding": [
            {
              "system": "https://bpcs.exchange/fhir/CodeSystem/cs-ObservationType",
              "code": "document"
            }
          ]
        }
      },
      {
        "id": "Observation.code",
        "path": "Observation.code",
        "mustSupport": true,
        "binding": {
          "strength": "required",
          "valueSet": "https://bpcs.exchange/fhir/ValueSet/vs-DocumentType"
        }
      },
      {
        "id": "Observation.code.extension",
        "path": "Observation.code.extension",
        "mustSupport": true
      },
      {
        "id": "Observation.code.extension:documentNote",
        "path": "Observation.code.extension",
        "sliceName": "documentNote",
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "https://bpcs.exchange/fhir/StructureDefinition/ext-Document-Note"
            ]
          }
        ],
        "mustSupport": true,
        "isModifier": false
      },
      {
        "id": "Observation.focus",
        "path": "Observation.focus",
        "type": [
          {
            "code": "Reference",
            "profile": [
              "https://bpcs.exchange/fhir/StructureDefinition/profile-Reference-rest"
            ],
            "targetProfile": [
              "https://bpcs.exchange/fhir/StructureDefinition/profile-Coverage-family"
            ]
          }
        ],
        "mustSupport": true
      },
      {
        "id": "Observation.value[x]",
        "path": "Observation.value[x]",
        "short": "Document Control Number",
        "min": 1,
        "type": [
          {
            "code": "string"
          }
        ],
        "mustSupport": true
      }
    ]
  }
}