{
  "resourceType": "StructureDefinition",
  "id": "profile-Claim-submit",
  "url": "https://bpcs.exchange/fhir/StructureDefinition/profile-Claim-submit",
  "name": "ClaimSubmit",
  "title": "Claim Submission Profile",
  "status": "active",
  "experimental": false,
  "description": "Information about a claim used when submitting the claim for adjudication",
  "fhirVersion": "5.0.0",
  "mapping": [
    {
      "identity": "BPCS",
      "name": "Internal BPCS API"
    }
  ],
  "kind": "resource",
  "abstract": true,
  "type": "Claim",
  "baseDefinition": "https://bpcs.exchange/fhir/StructureDefinition/profile-Claim-create",
  "derivation": "constraint",
  "differential": {
    "element": [
      {
        "id": "Claim.item",
        "path": "Claim.item",
        "constraint": [
          {
            "key": "bpcs-clm-1",
            "severity": "error",
            "human": "The override reason must be present if one of the modifiers is 'Accept' or if the amount has been overridden",
            "expression": "modifier.coding.exists(system='https://bpcs.exchange/fhir/CodeSystem/cs-ClaimModifier' and code='ACPT') or extension('https://bpcs.exchange/fhir/StructureDefinition/ext-Claim-OverrideNet').exists() implies extension('https://bpcs.exchange/fhir/StructureDefinition/ext-Claim-OverrideReason').exists()"
          }
        ]
      },
      {
        "id": "Claim.item.extension:overriddenReasons",
        "path": "Claim.item.extension",
        "sliceName": "overriddenReasons",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "https://bpcs.exchange/fhir/StructureDefinition/ext-Claim-OverriddenReasons"
            ]
          }
        ]
      },
      {
        "id": "Claim.item.extension:overrideReason",
        "path": "Claim.item.extension",
        "sliceName": "overrideReason",
        "comment": "This must be present if the original adjudication has been overridden to accept or reject the claim, if the amount has been overridden, or if any of the messages have been overridden",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "https://bpcs.exchange/fhir/StructureDefinition/ext-Claim-OverrideReason"
            ]
          }
        ],
        "condition": [
          "bpcs-clm-1"
        ]
      },
      {
        "id": "Claim.item.modifier.extension:duplicateVersion",
        "path": "Claim.item.modifier.extension",
        "sliceName": "duplicateVersion",
        "definition": "This is the version of the receipt as identified in the EOB that was selected by the user as being the duplicate",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "https://bpcs.exchange/fhir/StructureDefinition/ext-Claim-DuplicateVersion"
            ]
          }
        ],
        "mustSupport": true
      }
    ]
  }
}