{
  "resourceType": "StructureDefinition",
  "id": "profile-EnrollmentRequest",
  "url": "https://bpcs.exchange/fhir/StructureDefinition/profile-EnrollmentRequest",
  "name": "EnrollmentRequest",
  "title": "Enrollment Request",
  "status": "active",
  "experimental": false,
  "description": "Information about the solicitation for family BPCS insurance coverage",
  "fhirVersion": "5.0.0",
  "mapping": [
    {
      "identity": "BPCS",
      "name": "Internal BPCS API"
    }
  ],
  "kind": "resource",
  "abstract": false,
  "type": "EnrollmentRequest",
  "baseDefinition": "http://hl7.org/fhir/StructureDefinition/EnrollmentRequest",
  "derivation": "constraint",
  "differential": {
    "element": [
      {
        "id": "EnrollmentRequest.id",
        "path": "EnrollmentRequest.id",
        "comment": "This will be the same as the application number",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "EnrollmentRequest.extension",
        "path": "EnrollmentRequest.extension",
        "min": 2,
        "mustSupport": true
      },
      {
        "id": "EnrollmentRequest.extension:applicationStatus",
        "path": "EnrollmentRequest.extension",
        "sliceName": "applicationStatus",
        "min": 1,
        "type": [
          {
            "code": "Extension",
            "profile": [
              "https://bpcs.exchange/fhir/StructureDefinition/ext-EnrollmentRequest-Status"
            ]
          }
        ],
        "mustSupport": true
      },
      {
        "id": "EnrollmentRequest.extension:mode",
        "path": "EnrollmentRequest.extension",
        "sliceName": "mode",
        "min": 1,
        "type": [
          {
            "code": "Extension",
            "profile": [
              "https://bpcs.exchange/fhir/StructureDefinition/ext-Resource-Mode"
            ]
          }
        ],
        "mustSupport": true
      },
      {
        "id": "EnrollmentRequest.extension:resubmittedDate",
        "path": "EnrollmentRequest.extension",
        "sliceName": "resubmittedDate",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "https://bpcs.exchange/fhir/StructureDefinition/ext-EnrollmentRequest-ResubmittedDate"
            ]
          }
        ],
        "mustSupport": true
      },
      {
        "id": "EnrollmentRequest.status",
        "path": "EnrollmentRequest.status",
        "min": 1,
        "patternCode": "active"
      },
      {
        "id": "EnrollmentRequest.created",
        "path": "EnrollmentRequest.created",
        "type": [
          {
            "code": "dateTime",
            "profile": [
              "https://bpcs.exchange/fhir/StructureDefinition/profile-dateTime-date"
            ]
          }
        ],
        "mustSupport": true,
        "mapping": [
          {
            "identity": "BPCS",
            "map": "ApplicationDTO.mailReceivedDate, FamilyHistoryDTO.appOrigRecdDt"
          }
        ]
      },
      {
        "id": "EnrollmentRequest.insurer",
        "path": "EnrollmentRequest.insurer",
        "patternReference": {
          "reference": "Organization/bpcs"
        }
      },
      {
        "id": "EnrollmentRequest.candidate",
        "path": "EnrollmentRequest.candidate",
        "type": [
          {
            "code": "Reference",
            "profile": [
              "https://bpcs.exchange/fhir/StructureDefinition/profile-Reference-group-or-patient"
            ],
            "targetProfile": [
              "https://bpcs.exchange/fhir/StructureDefinition/profile-Patient-search"
            ]
          }
        ],
        "mustSupport": true
      },
      {
        "id": "EnrollmentRequest.coverage",
        "path": "EnrollmentRequest.coverage",
        "type": [
          {
            "code": "Reference",
            "profile": [
              "https://bpcs.exchange/fhir/StructureDefinition/profile-Reference-rest"
            ],
            "targetProfile": [
              "https://bpcs.exchange/fhir/StructureDefinition/profile-Coverage-family-create"
            ]
          }
        ],
        "mustSupport": true
      }
    ]
  }
}