{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://www.gynaehub.com/schemas/surgical-safety.json",
  "title": "Surgical & Labor Room Safety Checklist Schema",
  "description": "Standardized electronic perioperative & delivery safety verification checklist based on the WHO Safe Surgery Checklist adapted for obstetric and labor room procedures.",
  "type": "object",
  "required": ["patientIdentifiers", "signIn", "timeOut", "signOut"],
  "properties": {
    "patientIdentifiers": {
      "type": "object",
      "required": ["patientName", "cnicOrMrn", "procedurePlanned"],
      "properties": {
        "patientName": { "type": "string" },
        "cnicOrMrn": { "type": "string" },
        "procedurePlanned": { "type": "string" },
        "operatingHealthcareProvider": { "type": "string" },
        "dateTime": { "type": "string", "format": "date-time" }
      }
    },
    "signIn": {
      "type": "object",
      "description": "Before induction of anesthesia or active procedure",
      "required": [
        "patientConfirmedIdentitySiteConsent",
        "siteMarkedOrNotApplicable",
        "anesthesiaSafetyCheckComplete",
        "pulseOximeterFunctioning",
        "knownAllergiesScreened",
        "difficultAirwayRiskAssessed",
        "riskOfBloodLossOver500MlAssessed"
      ],
      "properties": {
        "patientConfirmedIdentitySiteConsent": { "type": "boolean" },
        "siteMarkedOrNotApplicable": { "type": "boolean" },
        "anesthesiaSafetyCheckComplete": { "type": "boolean" },
        "pulseOximeterFunctioning": { "type": "boolean" },
        "knownAllergiesScreened": { "type": "boolean" },
        "allergyNotes": { "type": "string" },
        "difficultAirwayRiskAssessed": { "type": "boolean" },
        "riskOfBloodLossOver500MlAssessed": { "type": "boolean" },
        "adequateIvAccessAndFluidsPlanned": { "type": "boolean" },
        "bloodUnitsArranged": { "type": "boolean" }
      }
    },
    "timeOut": {
      "type": "object",
      "description": "Before skin incision or immediate delivery intervention",
      "required": [
        "teamMembersIntroduced",
        "patientNameProcedureAndSiteVerballyConfirmed",
        "prophylacticAntibioticsGivenWithin60Min",
        "anticipatedCriticalEventsReviewed",
        "sterilityConfirmed"
      ],
      "properties": {
        "teamMembersIntroduced": { "type": "boolean" },
        "patientNameProcedureAndSiteVerballyConfirmed": { "type": "boolean" },
        "prophylacticAntibioticsGivenWithin60Min": { "type": "boolean" },
        "antibioticNameAndTime": { "type": "string" },
        "anticipatedCriticalEventsReviewed": { "type": "boolean" },
        "neonatalResuscitationTrolleyReady": { "type": "boolean" },
        "sterilityConfirmed": { "type": "boolean" }
      }
    },
    "signOut": {
      "type": "object",
      "description": "Before patient leaves operating or delivery room",
      "required": [
        "procedureNameRecorded",
        "instrumentSpongeAndNeedleCountsCorrect",
        "specimenLabeledCorrectly",
        "keyConcernsForRecoveryReviewed"
      ],
      "properties": {
        "procedureNameRecorded": { "type": "boolean" },
        "instrumentSpongeAndNeedleCountsCorrect": { "type": "boolean" },
        "specimenLabeledCorrectly": { "type": "boolean" },
        "maternalBloodLossEstimatedMl": { "type": "integer" },
        "keyConcernsForRecoveryReviewed": { "type": "boolean" },
        "postOpVitalSignsStable": { "type": "boolean" },
        "signatureLeadProvider": { "type": "string" }
      }
    }
  }
}
