{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/optum/json-schema/optum-bulk-member-match-response-schema.json",
  "title": "BulkMemberMatchResponse",
  "description": "FHIR Parameters response containing grouped match results",
  "x-generated": "2026-11-09",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/optum-provideraccessbulkmembermatch-api-openapi.yml#/components/schemas/BulkMemberMatchResponse",
  "type": "object",
  "properties": {
    "resourceType": {
      "type": "string"
    },
    "id": {
      "type": "string"
    },
    "meta": {
      "$ref": "#/$defs/Meta"
    },
    "parameter": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/ResponseParameter"
      }
    }
  },
  "$defs": {
    "Characteristic": {
      "type": "object",
      "properties": {
        "code": {
          "$ref": "#/$defs/CodeableConcept"
        },
        "valueReference": {
          "$ref": "#/$defs/Reference"
        },
        "exclude": {
          "type": "boolean"
        },
        "period": {
          "$ref": "#/$defs/Period"
        }
      }
    },
    "CodeableConcept": {
      "type": "object",
      "properties": {
        "coding": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/Coding"
          }
        }
      }
    },
    "Coding": {
      "type": "object",
      "properties": {
        "system": {
          "type": "string"
        },
        "code": {
          "type": "string"
        },
        "display": {
          "type": "string"
        }
      }
    },
    "Extension": {
      "type": "object",
      "properties": {
        "url": {
          "type": "string"
        },
        "valueReference": {
          "$ref": "#/$defs/Reference"
        }
      }
    },
    "Group": {
      "type": "object",
      "description": "FHIR Group resource used for match result",
      "properties": {
        "resourceType": {
          "type": "string"
        },
        "id": {
          "type": "string"
        },
        "text": {
          "$ref": "#/$defs/Narrative"
        },
        "contained": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/Patient"
          }
        },
        "identifier": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/Identifier"
          }
        },
        "type": {
          "type": "string"
        },
        "actual": {
          "type": "boolean"
        },
        "code": {
          "$ref": "#/$defs/CodeableConcept"
        },
        "managingEntity": {
          "$ref": "#/$defs/Reference"
        },
        "characteristic": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/Characteristic"
          }
        },
        "member": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/GroupMember"
          }
        }
      }
    },
    "GroupMember": {
      "type": "object",
      "properties": {
        "entity": {
          "type": "object",
          "properties": {
            "reference": {
              "type": "string"
            },
            "display": {
              "type": "string"
            },
            "extension": {
              "type": "array",
              "items": {
                "$ref": "#/$defs/Extension"
              }
            }
          }
        }
      }
    },
    "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"
        }
      }
    },
    "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"
        }
      }
    },
    "Reference": {
      "type": "object",
      "properties": {
        "reference": {
          "type": "string"
        },
        "display": {
          "type": "string"
        },
        "identifier": {
          "$ref": "#/$defs/Identifier"
        }
      }
    },
    "ResponseParameter": {
      "type": "object",
      "description": "Response parameter containing Group",
      "properties": {
        "name": {
          "type": "string",
          "enum": [
            "MatchedMembers",
            "NonMatchedMembers",
            "ConsentConstrainedMembers"
          ]
        },
        "resource": {
          "$ref": "#/$defs/Group"
        }
      }
    }
  }
}