{
  "resourceType": "StructureDefinition",
  "id": "profile-EnrollmentResponse",
  "url": "https://bpcs.exchange/fhir/StructureDefinition/profile-EnrollmentResponse",
  "name": "EnrollmentResponse",
  "title": "Enrollment Response",
  "status": "active",
  "experimental": false,
  "description": "Information about the acceptance or rejection of a request for BPCS family coverage",
  "fhirVersion": "5.0.0",
  "mapping": [
    {
      "identity": "BPCS",
      "name": "Internal BPCS API"
    }
  ],
  "kind": "resource",
  "abstract": false,
  "type": "EnrollmentResponse",
  "baseDefinition": "http://hl7.org/fhir/StructureDefinition/EnrollmentResponse",
  "derivation": "constraint",
  "differential": {
    "element": [
      {
        "id": "EnrollmentResponse.id",
        "path": "EnrollmentResponse.id",
        "comment": "This will be the same as the application number",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "EnrollmentResponse.meta",
        "path": "EnrollmentResponse.meta",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "EnrollmentResponse.meta.versionId",
        "path": "EnrollmentResponse.meta.versionId",
        "comment": "This will be the create timestamp for this application version, with no separators",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "EnrollmentResponse.meta.lastUpdated",
        "path": "EnrollmentResponse.meta.lastUpdated",
        "comment": "This will be the create timestamp for this application version",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "EnrollmentResponse.status",
        "path": "EnrollmentResponse.status",
        "comment": "The actual status of the application is conveyed in an extension",
        "min": 1,
        "patternCode": "active"
      },
      {
        "id": "EnrollmentResponse.request",
        "path": "EnrollmentResponse.request",
        "min": 1,
        "type": [
          {
            "code": "Reference",
            "profile": [
              "https://bpcs.exchange/fhir/StructureDefinition/profile-Reference-rest"
            ],
            "targetProfile": [
              "https://bpcs.exchange/fhir/StructureDefinition/profile-EnrollmentRequest"
            ],
            "aggregation": [
              "bundled"
            ],
            "versioning": "specific"
          }
        ],
        "mustSupport": true
      },
      {
        "id": "EnrollmentResponse.created",
        "path": "EnrollmentResponse.created",
        "short": "processedDate",
        "definition": "The date which the application was accepted.",
        "comment": "Date of rejection is not tracked by the system",
        "mustSupport": true,
        "mapping": [
          {
            "identity": "BPCS",
            "map": "ApplicationDTO.processedDate, FamilyHistoryDTO.appProcessedDt"
          }
        ]
      },
      {
        "id": "EnrollmentResponse.organization",
        "path": "EnrollmentResponse.organization",
        "min": 1,
        "patternReference": {
          "reference": "Organization/bpcs"
        }
      }
    ]
  }
}