{
  "id": "REMS-SEARCH",
  "title": "Search REMS programs",
  "shortTitle": "Search REMS programs",
  "method": "GET",
  "path": "/v1/rems-programs/search",
  "queryPath": null,
  "group": "safety",
  "unsupportedFields": [],
  "availability": "preview",
  "request": {
    "additionalProperties": false,
    "properties": {
      "q": {
        "maxLength": 500,
        "minLength": 1,
        "type": "string",
        "title": "Q"
      },
      "status": {
        "anyOf": [
          {
            "enum": [
              "current",
              "inactive",
              "moved_to_shared_system",
              "released"
            ],
            "type": "string"
          },
          {
            "items": {
              "enum": [
                "current",
                "inactive",
                "moved_to_shared_system",
                "released"
              ],
              "type": "string"
            },
            "type": "array"
          }
        ],
        "title": "Status"
      },
      "requirement": {
        "anyOf": [
          {
            "enum": [
              "communication_plan",
              "dispenser_certification",
              "elements_to_assure_safe_use",
              "implementation_system",
              "medication_guide",
              "patient_enrollment",
              "prescriber_certification",
              "prescriber_training"
            ],
            "type": "string"
          },
          {
            "items": {
              "enum": [
                "communication_plan",
                "dispenser_certification",
                "elements_to_assure_safe_use",
                "implementation_system",
                "medication_guide",
                "patient_enrollment",
                "prescriber_certification",
                "prescriber_training"
              ],
              "type": "string"
            },
            "type": "array"
          }
        ],
        "title": "Requirement"
      },
      "limit": {
        "default": 20,
        "maximum": 100,
        "minimum": 1,
        "title": "Limit",
        "type": "integer"
      },
      "cursor": {
        "type": "string",
        "title": "Cursor"
      }
    },
    "title": "RemsSearchRequest",
    "type": "object"
  },
  "response": {
    "$defs": {
      "PageMeta": {
        "additionalProperties": false,
        "properties": {
          "limit": {
            "title": "Limit",
            "type": "integer"
          },
          "has_more": {
            "title": "Has More",
            "type": "boolean"
          },
          "next_cursor": {
            "type": "string",
            "title": "Next Cursor"
          },
          "total": {
            "type": "integer",
            "title": "Total"
          },
          "total_relation": {
            "const": "lower_bound",
            "type": "string",
            "title": "Total Relation"
          }
        },
        "required": [
          "has_more",
          "limit"
        ],
        "title": "PageMeta",
        "type": "object"
      },
      "PublicRemsCoveredProduct": {
        "additionalProperties": false,
        "properties": {
          "trade_name": {
            "type": "string",
            "title": "Trade Name"
          },
          "established_name": {
            "type": "string",
            "title": "Established Name"
          },
          "dosage_form": {
            "type": "string",
            "title": "Dosage Form"
          },
          "application_number": {
            "type": "string",
            "title": "Application Number"
          }
        },
        "title": "PublicRemsCoveredProduct",
        "type": "object"
      },
      "PublicRemsProgram": {
        "additionalProperties": false,
        "properties": {
          "rems_id": {
            "title": "Rems Id",
            "type": "string"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "status": {
            "enum": [
              "current",
              "inactive",
              "moved_to_shared_system",
              "released"
            ],
            "title": "Status",
            "type": "string"
          },
          "requirements": {
            "items": {
              "enum": [
                "communication_plan",
                "dispenser_certification",
                "elements_to_assure_safe_use",
                "implementation_system",
                "medication_guide",
                "patient_enrollment",
                "prescriber_certification",
                "prescriber_training"
              ],
              "type": "string"
            },
            "title": "Requirements",
            "type": "array"
          },
          "approved_date": {
            "type": "string",
            "title": "Approved Date"
          },
          "updated_date": {
            "type": "string",
            "title": "Updated Date"
          },
          "covered_product_count": {
            "minimum": 0,
            "title": "Covered Product Count",
            "type": "integer"
          },
          "covered_products": {
            "items": {
              "$ref": "#/$defs/PublicRemsCoveredProduct"
            },
            "type": "array",
            "title": "Covered Products"
          },
          "products_page": {
            "$ref": "#/$defs/PageMeta"
          }
        },
        "required": [
          "covered_product_count",
          "name",
          "rems_id",
          "requirements",
          "status"
        ],
        "title": "PublicRemsProgram",
        "type": "object"
      }
    },
    "items": {
      "$ref": "#/$defs/PublicRemsProgram"
    },
    "type": "array"
  }
}
