{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/optum/json-schema/optum-bulk-member-match-request-schema.json",
  "title": "BulkMemberMatchRequest",
  "description": "FHIR Parameters request for bulk member match",
  "x-generated": "2026-11-09",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/optum-provideraccessbulkmembermatch-api-openapi.yml#/components/schemas/BulkMemberMatchRequest",
  "type": "object",
  "properties": {
    "resourceType": {
      "type": "string"
    },
    "id": {
      "type": "string"
    },
    "meta": {
      "$ref": "#/$defs/Meta"
    },
    "parameter": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/Parameter"
      }
    }
  },
  "$defs": {
    "CodeableConcept": {
      "type": "object",
      "properties": {
        "coding": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/Coding"
          }
        }
      }
    },
    "Coding": {
      "type": "object",
      "properties": {
        "system": {
          "type": "string"
        },
        "code": {
          "type": "string"
        },
        "display": {
          "type": "string"
        }
      }
    },
    "Consent": {
      "type": "object",
      "properties": {
        "resourceType": {
          "type": "string"
        },
        "id": {
          "type": "string"
        },
        "text": {
          "$ref": "#/$defs/Narrative"
        },
        "status": {
          "type": "string"
        },
        "scope": {
          "$ref": "#/$defs/CodeableConcept"
        },
        "category": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/CodeableConcept"
          }
        },
        "patient": {
          "$ref": "#/$defs/Reference"
        },
        "dateTime": {
          "type": "string"
        },
        "performer": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/Reference"
          }
        },
        "sourceReference": {
          "$ref": "#/$defs/Reference"
        },
        "policy": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "uri": {
                "type": "string"
              }
            }
          }
        },
        "verification": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/Verification"
          }
        },
        "provision": {
          "$ref": "#/$defs/Provision"
        }
      }
    },
    "Coverage": {
      "type": "object",
      "properties": {
        "resourceType": {
          "type": "string"
        },
        "id": {
          "type": "string"
        },
        "text": {
          "$ref": "#/$defs/Narrative"
        },
        "identifier": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/IdentifierWithType"
          }
        },
        "status": {
          "type": "string"
        },
        "subscriberId": {
          "type": "string"
        },
        "beneficiary": {
          "$ref": "#/$defs/Reference"
        },
        "relationship": {
          "$ref": "#/$defs/CodeableConcept"
        },
        "period": {
          "$ref": "#/$defs/Period"
        },
        "payor": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/Reference"
          }
        },
        "class": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/CoverageClass"
          }
        }
      }
    },
    "CoverageClass": {
      "type": "object",
      "properties": {
        "type": {
          "$ref": "#/$defs/CodeableConcept"
        },
        "value": {
          "type": "string"
        }
      }
    },
    "HumanName": {
      "type": "object",
      "properties": {
        "use": {
          "type": "string"
        },
        "family": {
          "type": "string"
        },
        "given": {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      }
    },
    "Identifier": {
      "type": "object",
      "properties": {
        "system": {
          "type": "string"
        },
        "value": {
          "type": "string"
        }
      }
    },
    "IdentifierWithType": {
      "type": "object",
      "properties": {
        "type": {
          "$ref": "#/$defs/CodeableConcept"
        },
        "system": {
          "type": "string"
        },
        "value": {
          "type": "string"
        },
        "assigner": {
          "type": "object",
          "properties": {
            "display": {
              "type": "string"
            }
          }
        }
      }
    },
    "Meta": {
      "type": "object",
      "properties": {
        "profile": {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      }
    },
    "Narrative": {
      "type": "object",
      "properties": {
        "status": {
          "type": "string"
        },
        "div": {
          "type": "string"
        }
      }
    },
    "Parameter": {
      "type": "object",
      "description": "Input parameter entry",
      "properties": {
        "name": {
          "type": "string"
        },
        "part": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/ParameterPart"
          }
        }
      }
    },
    "ParameterPart": {
      "type": "object",
      "description": "Nested part representing Patient/Coverage/Consent",
      "properties": {
        "name": {
          "type": "string",
          "enum": [
            "MemberPatient",
            "CoverageToMatch",
            "Consent"
          ]
        },
        "resource": {
          "oneOf": [
            {
              "$ref": "#/$defs/Patient"
            },
            {
              "$ref": "#/$defs/Coverage"
            },
            {
              "$ref": "#/$defs/Consent"
            }
          ]
        }
      }
    },
    "Patient": {
      "type": "object",
      "properties": {
        "resourceType": {
          "type": "string"
        },
        "id": {
          "type": "string"
        },
        "text": {
          "$ref": "#/$defs/Narrative"
        },
        "identifier": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/IdentifierWithType"
          }
        },
        "name": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/HumanName"
          }
        },
        "gender": {
          "type": "string"
        },
        "birthDate": {
          "type": "string"
        }
      }
    },
    "Period": {
      "type": "object",
      "properties": {
        "start": {
          "type": "string"
        },
        "end": {
          "type": "string"
        }
      }
    },
    "Provision": {
      "type": "object",
      "properties": {
        "type": {
          "type": "string"
        },
        "period": {
          "$ref": "#/$defs/Period"
        },
        "actor": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/ProvisionActor"
          }
        },
        "purpose": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/Coding"
          }
        }
      }
    },
    "ProvisionActor": {
      "type": "object",
      "properties": {
        "role": {
          "$ref": "#/$defs/CodeableConcept"
        },
        "reference": {
          "$ref": "#/$defs/Reference"
        }
      }
    },
    "Reference": {
      "type": "object",
      "properties": {
        "reference": {
          "type": "string"
        },
        "display": {
          "type": "string"
        },
        "identifier": {
          "$ref": "#/$defs/Identifier"
        }
      }
    },
    "Verification": {
      "type": "object",
      "properties": {
        "verified": {
          "type": "boolean"
        },
        "verifiedWith": {
          "$ref": "#/$defs/Reference"
        },
        "verificationDate": {
          "type": "string"
        }
      }
    }
  }
}