{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "@context": [
    "https://schemas.meta-aiml.org/v3.0.0/context.jsonld"
  ],
  "@id": "https://schemas.meta-aiml.org/v3.0.0/entity/telemedicine_platform.json",
  "$id": "https://schemas.meta-aiml.org/v3.0.0/entity/telemedicine_platform.json",
  "@type": "TelemedicinePlatform",
  "schemaVersion": "3.0.0",
  "aimlVersion": "3.0.0",
  "title": "Telemedicine Platform Entity Schema",
  "description": "v3 schema for telemedicine service platforms that deliver remote care workflows directly to patients through digital consultation, scheduling, and clinical coordination tools.",
  "examples": [
    {
      "description": "Telehealth platform with video consultations and digital follow-up care plans",
      "reference": "telemedicine_platform_example_primary_care"
    },
    {
      "description": "Specialty telemedicine platform with asynchronous triage and prescription support",
      "reference": "telemedicine_platform_example_specialty"
    }
  ],
  "type": "object",
  "additionalProperties": false,
  "allOf": [
    {
      "$ref": "../ontology/digital_entity.json"
    },
    {
      "$ref": "../archetypes/direct_service.json"
    }
  ],
  "properties": {
    "@type": {
      "const": "TelemedicinePlatform"
    },
    "ontologicalMode": {
      "const": "DigitalEntity"
    },
    "interactionArchetype": {
      "type": "array",
      "contains": {
        "const": "DirectService"
      },
      "items": {
        "type": "string",
        "enum": [
          "DirectService"
        ]
      }
    },
    "domain": {
      "const": "Healthcare"
    },
    "businessModel": {
      "type": "array",
      "items": {
        "type": "string",
        "enum": [
          "InsuranceReimbursement",
          "Subscription",
          "Transactional"
        ]
      }
    },
    "deliveryFormat": {
      "type": "array",
      "items": {
        "type": "string",
        "enum": [
          "WebApp",
          "MobileApp",
          "API"
        ]
      }
    },
    "name": {
      "$ref": "../components/multilingual_format.json#/$defs/LocalizedText"
    },
    "description": {
      "$ref": "../components/multilingual_format.json#/$defs/LocalizedText"
    },
    "shortDescription": {
      "$ref": "../components/multilingual_format.json#/$defs/LocalizedTextOrString"
    },
    "url": {
      "type": "string",
      "format": "uri"
    },
    "foundingDate": {
      "type": "string",
      "format": "date"
    },
    "properties": {
      "type": "object",
      "properties": {
        "consultationModes": {
          "type": "array",
          "items": {
            "type": "string",
            "enum": [
              "video",
              "audio",
              "chat",
              "asynchronous"
            ]
          }
        },
        "supportsEprescription": {
          "type": "boolean"
        },
        "supportsLabOrderIntegration": {
          "type": "boolean"
        },
        "careContinuityModel": {
          "type": "string",
          "enum": [
            "episodic",
            "longitudinal",
            "hybrid"
          ]
        },
        "clinicalTriageEnabled": {
          "type": "boolean"
        },
        "contactPoints": {
          "type": "array",
          "items": {
            "$ref": "../components/common_defs.json#/$defs/ContactPoint"
          }
        },
        "socialProfiles": {
          "type": "array",
          "items": {
            "$ref": "../components/common_defs.json#/$defs/SocialProfile"
          }
        },
        "identifiers": {
          "type": "array",
          "items": {
            "$ref": "../components/common_defs.json#/$defs/Identifier"
          }
        }
      }
    },
    "capabilities": {
      "type": "object",
      "required": [
        "interaction",
        "booking"
      ],
      "properties": {
        "interaction": {
          "$ref": "../components/capability_groups.json#/$defs/InteractionCapabilities"
        },
        "booking": {
          "$ref": "../components/capability_groups.json#/$defs/BookingCapabilities"
        },
        "financial": {
          "$ref": "../components/capability_groups.json#/$defs/FinancialCapabilities"
        },
        "content": {
          "$ref": "../components/capability_groups.json#/$defs/ContentCapabilities"
        }
      }
    },
    "modules": {
      "type": "object",
      "properties": {
        "appointments": {
          "type": "object",
          "properties": {
            "waitRoomEnabled": {
              "type": "boolean"
            },
            "autoRemindersEnabled": {
              "type": "boolean"
            },
            "providerCalendarSync": {
              "type": "boolean"
            }
          }
        },
        "clinicalRecords": {
          "type": "object",
          "properties": {
            "ehrIntegrationEnabled": {
              "type": "boolean"
            },
            "visitSummaryGeneration": {
              "type": "boolean"
            },
            "medicationReconciliationSupport": {
              "type": "boolean"
            }
          }
        },
        "compliance": {
          "type": "object",
          "properties": {
            "consentWorkflowEnabled": {
              "type": "boolean"
            },
            "auditTrailEnabled": {
              "type": "boolean"
            },
            "dataRetentionPolicyDefined": {
              "type": "boolean"
            }
          }
        }
      }
    },
    "structuralMetadata": {
      "type": "object",
      "properties": {
        "topology": {
          "const": "binary"
        },
        "roles": {
          "const": [
            "user",
            "platform"
          ]
        },
        "valueSource": {
          "const": "platform_provided"
        },
        "transactionFlow": {
          "const": "direct"
        },
        "networkEffects": {
          "const": "none"
        },
        "careDeliveryType": {
          "type": "string",
          "enum": [
            "on_demand",
            "scheduled",
            "blended"
          ]
        }
      }
    },
    "targetAudience": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "siteCapabilities": {
      "type": "object",
      "properties": {
        "supportedDevices": {
          "type": "array",
          "items": {
            "type": "string",
            "enum": [
              "desktop",
              "mobile",
              "tablet"
            ]
          }
        },
        "languages": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "accessibilityFeatures": {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      }
    }
  },
  "required": [
    "@type",
    "ontologicalMode",
    "interactionArchetype",
    "domain",
    "name",
    "description",
    "deliveryFormat",
    "capabilities",
    "structuralMetadata",
    "modules"
  ],
  "validationMetadata": {
    "schemaVersion": "3.0.0",
    "phase": "entity",
    "status": "draft",
    "lastValidated": "2026-02-20T12:00:00Z",
    "validator": "META-AIML QA"
  },
  "semanticAnnotations": {
    "classificationRationale": "TelemedicinePlatform is modeled as DigitalEntity + DirectService because care workflows are delivered directly by platform-supported providers to patients via digital channels.",
    "disambiguationNotes": "Different from provider marketplaces where the platform primarily mediates independent third-party clinicians."
  },
  "governanceMetadata": {
    "entityVersion": "3.0.0",
    "introducedIn": "META-AIML v3.0.0",
    "stabilityLevel": "draft",
    "sdkValidationRules": [
      "RULE-TMED-001: @type MUST equal \"TelemedicinePlatform\"",
      "RULE-TMED-002: ontologicalMode MUST equal \"DigitalEntity\"",
      "RULE-TMED-003: interactionArchetype MUST contain \"DirectService\"",
      "RULE-TMED-004: capabilities.interaction MUST be present",
      "RULE-TMED-005: consultationModes SHOULD be explicitly declared",
      "RULE-TMED-006: structuralMetadata.valueSource MUST equal \"platform_provided\""
    ]
  }
}
