{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://www.gynaehub.com/schemas/high-risk-triage.json",
  "title": "High-Risk Obstetric Triage Performa Schema",
  "description": "Risk stratification and maternal emergency triage performa for outpatient and emergency labor triage units according to PHC MSDS.",
  "type": "object",
  "required": ["patientInfo", "triageCategory", "vitalSigns", "redFlagScreening", "triageDisposition"],
  "properties": {
    "patientInfo": {
      "type": "object",
      "required": ["name", "age", "gestationalAgeWeeks"],
      "properties": {
        "name": { "type": "string" },
        "age": { "type": "integer" },
        "gestationalAgeWeeks": { "type": "number" },
        "parity": { "type": "string" }
      }
    },
    "triageCategory": {
      "type": "string",
      "enum": [
        "RED - Emergency (Immediate Care / Resuscitation)",
        "ORANGE - Very Urgent (Care within 15 mins)",
        "YELLOW - Urgent (Care within 60 mins)",
        "GREEN - Routine Non-Urgent"
      ]
    },
    "vitalSigns": {
      "type": "object",
      "required": ["bloodPressure", "pulseRate", "respiratoryRate", "oxygenSaturationPct"],
      "properties": {
        "bloodPressure": { "type": "string" },
        "pulseRate": { "type": "integer" },
        "respiratoryRate": { "type": "integer" },
        "temperatureCelsius": { "type": "number" },
        "oxygenSaturationPct": { "type": "integer" }
      }
    },
    "redFlagScreening": {
      "type": "object",
      "required": [
        "severeVaginalBleeding",
        "severeHeadacheOrVisualBlurring",
        "activeSeizuresOrLossOfConsciousness",
        "severeEpigastricPain",
        "fetalHeartAbsentOrBelow100Bpm"
      ],
      "properties": {
        "severeVaginalBleeding": { "type": "boolean" },
        "severeHeadacheOrVisualBlurring": { "type": "boolean" },
        "activeSeizuresOrLossOfConsciousness": { "type": "boolean" },
        "severeEpigastricPain": { "type": "boolean" },
        "respiratoryDistress": { "type": "boolean" },
        "fetalHeartAbsentOrBelow100Bpm": { "type": "boolean" },
        "cordProlapseOrHandProlapse": { "type": "boolean" }
      }
    },
    "triageDisposition": {
      "type": "object",
      "required": ["action", "attendingProvider"],
      "properties": {
        "action": {
          "type": "string",
          "enum": [
            "Immediate Resuscitation & Emergency Specialist Alert",
            "Urgent Labor Room Admission",
            "Antenatal High-Risk Assessment Unit",
            "Routine ANC Review"
          ]
        },
        "immediateInterventionGiven": { "type": "string" },
        "attendingProvider": { "type": "string" }
      }
    }
  }
}
