{
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "$id": "https://getpept.io/data/schema.json",
 "title": "getpept clinic dossier",
 "version": "1.0.0",
 "type": "object",
 "required": [
  "clinics"
 ],
 "properties": {
  "clinics": {
   "type": "array",
   "items": {
    "$ref": "#/$defs/clinic"
   }
  }
 },
 "$defs": {
  "clinic": {
   "type": "object",
   "required": [
    "id",
    "stable_id",
    "name",
    "city",
    "state",
    "official_website",
    "page_url",
    "last_verified",
    "rank",
    "pricing",
    "sourcing",
    "team",
    "claims",
    "why_this_clinic",
    "questions_to_ask"
   ],
   "properties": {
    "id": {
     "type": "string",
     "pattern": "^[a-z0-9-]+$"
    },
    "stable_id": {
     "type": "string"
    },
    "name": {
     "type": "string"
    },
    "city": {
     "type": "string",
     "description": "The city page the clinic is listed under: the city itself or, for a metro area, its principal city. The clinic's own town is in address."
    },
    "state": {
     "type": "string",
     "minLength": 2,
     "maxLength": 2,
     "description": "Two-letter code of the clinic's own state, which for a metro area can differ from its city page's state."
    },
    "address": {
     "type": [
      "string",
      "null"
     ]
    },
    "official_website": {
     "type": "string",
     "format": "uri"
    },
    "page_url": {
     "type": "string"
    },
    "json_url": {
     "type": "string"
    },
    "last_verified": {
     "type": "object"
    },
    "rank": {
     "type": "object",
     "description": "The neutral getpept score and ranks (see /how-we-rank/). A clinic with no Google Maps listing matched to its own website, or whose matched Google Maps listing has no reviews yet, is not ranked yet: its score, ranks and score parts are null, nothing is estimated, and it is listed after the ranked clinics in its city.",
     "required": [
      "status",
      "getpept_score",
      "city_rank",
      "national_rank",
      "paid_status_is_input"
     ],
     "properties": {
      "status": {
       "enum": [
        "ranked",
        "not_ranked_yet"
       ]
      },
      "getpept_score": {
       "type": [
        "number",
        "null"
       ]
      },
      "city_rank": {
       "type": [
        "integer",
        "null"
       ]
      },
      "national_rank": {
       "type": [
        "integer",
        "null"
       ]
      },
      "score_parts": {
       "type": [
        "object",
        "null"
       ],
       "description": "rating, volume, recency, oversight and transparency points; they add up to getpept_score. When the age of the newest Google review could not be established, recency is null and getpept_score is the other four parts scaled from 95 to 100 points, capped at those parts plus the average recency points of the ranked clinics whose recency is not null; nothing is estimated."
      },
      "note": {
       "type": "string"
      },
      "paid_status_is_input": {
       "const": false
      }
     }
    },
    "pricing": {
     "type": "object",
     "properties": {
      "status": {
       "enum": [
        "published",
        "partial",
        "on booking page",
        "not published"
       ]
      },
      "items": {
       "type": "array",
       "items": {
        "type": "object",
        "required": [
         "label",
         "amount_usd",
         "unit",
         "category",
         "source_url",
         "source_type",
         "checked_at",
         "confidence"
        ],
        "properties": {
         "label": {
          "type": "string"
         },
         "amount_usd": {
          "type": "number",
          "minimum": 0
         },
         "amount_max_usd": {
          "type": [
           "number",
           "null"
          ]
         },
         "unit": {
          "enum": [
           "one-time",
           "month",
           "year",
           "quarter",
           "installment",
           "week",
           "day",
           "session",
           "visit",
           "vial",
           "program",
           "unit"
          ]
         },
         "category": {
          "enum": [
           "consult",
           "membership",
           "peptide",
           "glp1",
           "iv_nad",
           "labs",
           "hormone",
           "other"
          ]
         },
         "source_url": {
          "type": "string",
          "format": "uri"
         },
         "source_type": {
          "enum": [
           "clinic site",
           "booking widget",
           "third-party"
          ]
         },
         "checked_at": {
          "type": "string",
          "format": "date-time"
         },
         "confidence": {
          "enum": [
           "high",
           "medium",
           "low"
          ]
         },
         "note": {
          "type": "string"
         }
        }
       }
      }
     }
    },
    "sourcing": {
     "type": "object"
    },
    "team": {
     "type": "array",
     "description": "The clinicians the clinic’s own website names",
     "items": {
      "$ref": "#/$defs/person"
     }
    },
    "claims": {
     "type": "array",
     "items": {
      "type": "object",
      "required": [
       "claim_type",
       "quote",
       "source_url",
       "status",
       "basis",
       "checked_at"
      ],
      "properties": {
       "claim_type": {
        "type": "string"
       },
       "quote": {
        "type": "string",
        "maxLength": 200
       },
       "source_url": {
        "type": "string",
        "format": "uri"
       },
       "status": {
        "enum": [
         "verified",
         "physician_named",
         "unverified",
         "contradicted"
        ],
        "description": "verified: backed by a public record. physician_named (physician-supervised claims only): the clinic's pages name an MD or DO. unverified: getpept couldn't check it, which doesn't mean it is false. contradicted: a public record disagrees."
       },
       "basis": {
        "type": "string"
       },
       "checked_at": {
        "type": "string"
       }
      }
     }
    },
    "data_depth": {
     "type": "integer",
     "minimum": 0,
     "maximum": 5
    },
    "why_this_clinic": {
     "type": "object",
     "required": [
      "text",
      "cite"
     ],
     "properties": {
      "text": {
       "type": "string"
      },
      "cite": {
       "type": "string"
      },
      "inputs": {
       "type": "object"
      }
     }
    },
    "questions_to_ask": {
     "type": "array",
     "items": {
      "type": "object",
      "required": [
       "question",
       "why",
       "gap_field"
      ],
      "properties": {
       "question": {
        "type": "string"
       },
       "why": {
        "type": "string"
       },
       "gap_field": {
        "type": "string"
       }
      }
     }
    },
    "profile": {
     "type": [
      "object",
      "null"
     ],
     "description": "The publishable parts of the deeper profile re-read at the source on checked_at: public-review themes (each a paraphrase with a support word and dated example links), review platforms other than Google, business facts from the clinic's own site or a government record, and named pharmacies. null when the clinic has nothing publishable."
    },
    "peptides_named": {
     "type": "array",
     "description": "Peptides and GLP-1 medications named on the clinic's own website (or a brand-wide statement on that site) as of checked_at, matched against the canonical list. Omitted when no name was confirmed on the clinic's own site. getpept lists what a clinic names; whether a treatment is right for a person is for a licensed clinician.",
     "items": {
      "$ref": "#/$defs/peptide_named"
     }
    }
   }
  },
  "peptide_named": {
   "type": "object",
   "required": [
    "name",
    "slug",
    "group",
    "as_written",
    "source_url",
    "checked_at"
   ],
   "properties": {
    "name": {
     "type": "string",
     "description": "Canonical peptide or GLP-1 medication name from source/peptides.json"
    },
    "slug": {
     "type": "string",
     "pattern": "^[a-z0-9-]+$",
     "description": "Canonical slug matching /peptides/{slug}/ and /data/peptides.json"
    },
    "group": {
     "enum": [
      "peptide",
      "glp1",
      "other"
     ],
     "description": "Catalog group: peptides ('peptide'), GLP-1 medications ('glp1'), or other compounds clinics name ('other'), kept apart"
    },
    "as_written": {
     "type": "string",
     "description": "The wording as the clinic's own page writes it"
    },
    "source_url": {
     "type": "string",
     "format": "uri",
     "description": "The page of the clinic's own website where the name was read"
    },
    "checked_at": {
     "type": "string",
     "format": "date",
     "description": "Date the clinic's own page was read (YYYY-MM-DD)"
    },
    "brand_wide": {
     "const": true,
     "description": "Set when read from a brand-wide page on the brand's own site covering its locations"
    },
    "brand_wide_note": {
     "type": "string",
     "description": "What that brand-wide page states"
    }
   }
  },
  "price_item": {
   "type": "object",
   "required": [
    "label",
    "amount_usd",
    "unit",
    "category",
    "source_url",
    "source_type",
    "checked_at",
    "confidence"
   ],
   "properties": {
    "label": {
     "type": "string"
    },
    "amount_usd": {
     "type": "number",
     "minimum": 0
    },
    "amount_max_usd": {
     "type": [
      "number",
      "null"
     ]
    },
    "unit": {
     "enum": [
      "one-time",
      "month",
      "year",
      "quarter",
      "installment",
      "week",
      "day",
      "session",
      "visit",
      "vial",
      "program",
      "unit"
     ]
    },
    "category": {
     "enum": [
      "consult",
      "membership",
      "peptide",
      "glp1",
      "iv_nad",
      "labs",
      "hormone",
      "other"
     ]
    },
    "source_url": {
     "type": "string",
     "format": "uri"
    },
    "source_type": {
     "enum": [
      "clinic site",
      "booking widget",
      "third-party"
     ]
    },
    "checked_at": {
     "type": "string",
     "format": "date-time"
    },
    "confidence": {
     "enum": [
      "high",
      "medium",
      "low"
     ]
    },
    "note": {
     "type": "string"
    }
   }
  },
  "claim": {
   "type": "object",
   "required": [
    "claim_type",
    "quote",
    "source_url",
    "status",
    "basis",
    "checked_at"
   ],
   "properties": {
    "claim_type": {
     "type": "string"
    },
    "quote": {
     "type": "string",
     "maxLength": 200
    },
    "source_url": {
     "type": "string",
     "format": "uri"
    },
    "status": {
     "enum": [
      "verified",
      "physician_named",
      "unverified",
      "contradicted"
     ],
     "description": "verified: backed by a public record. physician_named (physician-supervised claims only): the clinic's pages name an MD or DO. unverified: getpept couldn't check it, which doesn't mean it is false. contradicted: a public record disagrees."
    },
    "basis": {
     "type": "string"
    },
    "checked_at": {
     "type": "string"
    }
   }
  },
  "person": {
   "type": "object",
   "required": [
    "name",
    "license"
   ],
   "properties": {
    "name": {
     "type": "string"
    },
    "credential_stated": {
     "type": [
      "string",
      "null"
     ],
     "description": "The clinician’s credential or clinical role as the clinic’s page gives it (MD, NP, RN, or words such as “Registered nurse”); only clinicians are listed"
    },
    "source_url": {
     "type": [
      "string",
      "null"
     ],
     "description": "The page of the clinic’s own website that names this clinician (never social media, a booking page or another site)"
    },
    "brand_wide": {
     "const": true,
     "description": "Set when the page that names this clinician is the brand’s own statement about all its locations, on a page whose address names another of them"
    },
    "brand_wide_note": {
     "type": "string",
     "description": "What that page states, for example who oversees the clinical services of every location"
    },
    "found_via": {
     "type": "string"
    },
    "npi": {
     "type": [
      "object",
      "null"
     ],
     "description": "Federal NPI Registry identity record when full name, state and credential class agree on a single NPI-1 match (an identity record, not a license confirmation). Null for multiple, none or unknown matches.",
     "required": [
      "number",
      "url",
      "checked_at",
      "match"
     ],
     "properties": {
      "number": {
       "type": "string",
       "pattern": "^\\d{10}$",
       "description": "10-digit NPI number passing CMS's check digit"
      },
      "credential": {
       "type": [
        "string",
        "null"
       ]
      },
      "taxonomy": {
       "type": [
        "string",
        "null"
       ],
       "description": "Primary taxonomy description as written in the federal NPI Registry"
      },
      "url": {
       "type": "string",
       "format": "uri",
       "description": "Link to the federal NPI Registry provider-view page for this NPI"
      },
      "checked_at": {
       "type": "string",
       "format": "date",
       "description": "Date getpept checked this NPI Registry entry (YYYY-MM-DD)"
      },
      "match": {
       "const": "single"
      }
     }
    },
    "license": {
     "description": "Set only when getpept has confirmed the license: the state board lists it as active and the record matches the clinician by more than the name. For everyone else it is null: no license is listed for them, which is not a finding about them. No other license finding is ever published.",
     "anyOf": [
      {
       "type": "null"
      },
      {
       "type": "object",
       "required": [
        "status",
        "label",
        "board",
        "state",
        "number",
        "url",
        "checked_at"
       ],
       "properties": {
        "status": {
         "const": "confirmed_active"
        },
        "label": {
         "const": "Active license confirmed",
         "description": "The text pages show"
        },
        "board": {
         "type": "string"
        },
        "state": {
         "type": "string"
        },
        "number": {
         "type": "string"
        },
        "type": {
         "type": [
          "string",
          "null"
         ]
        },
        "url": {
         "type": "string",
         "description": "The board record or search used to confirm the license"
        },
        "checked_at": {
         "type": "string",
         "format": "date"
        }
       }
      }
     ]
    },
    "board_certifications": {
     "type": "array",
     "description": "Specialty boards listed on the board record that confirmed the license"
    },
    "checked_at": {
     "type": [
      "string",
      "null"
     ]
    }
   }
  }
 }
}
