{
  "version": 21,
  "variables": [],
  "tiles": {
    "0": {
      "type": "markdown",
      "content": "# Clinica Las Condes — Observabilidad de Negocio\n## Journey: Registro y Agendamiento de Pacientes\n\n---\n\nEste dashboard monitorea el flujo completo de registro de pacientes nuevos en el portal digital de CLC, desde la verificacion de identidad (RUT) hasta la confirmacion de cita medica."
    },
    "1": {
      "type": "markdown",
      "content": "### Flujo del Paciente\n\n**Verificacion de Identidad** (RUT) > **Creacion de Ficha Medica** (datos + prevision) > **Seleccion de Especialidad y Medico** > **Reserva de Hora** > **Pago de Copago** (Webpay) > **Confirmacion de Cita** (email + SMS)\n\n---"
    },
    "2": {
      "type": "markdown",
      "content": "## Indicadores Clave de Rendimiento"
    },
    "3": {
      "title": "Total Interacciones de Pacientes",
      "type": "data",
      "query": "fetch bizevents\n| filter event.provider == \"CLC\"\n| filter event.kind == \"BIZ_EVENT\"\n| summarize total = count()",
      "visualization": "singleValue"
    },
    "4": {
      "title": "Journeys Unicos de Pacientes",
      "type": "data",
      "query": "fetch bizevents\n| filter event.provider == \"CLC\"\n| filter event.kind == \"BIZ_EVENT\"\n| summarize journeys = countDistinct(trace_id)",
      "visualization": "singleValue"
    },
    "5": {
      "title": "Citas Confirmadas",
      "type": "data",
      "query": "fetch bizevents\n| filter event.provider == \"CLC\"\n| filter event.kind == \"BIZ_EVENT\"\n| filter event.type == \"appointmentconfirmationservice\"\n| summarize confirmadas = count()",
      "visualization": "singleValue"
    },
    "6": {
      "title": "Verificaciones de Identidad (RUT)",
      "type": "data",
      "query": "fetch bizevents\n| filter event.provider == \"CLC\"\n| filter event.kind == \"BIZ_EVENT\"\n| filter event.type == \"patientidentityverificationservice\"\n| summarize verificaciones = count()",
      "visualization": "singleValue"
    },
    "7": {
      "type": "markdown",
      "content": "---\n## Volumen de Actividad por Etapa del Journey"
    },
    "8": {
      "title": "Eventos por Etapa del Registro de Pacientes",
      "type": "data",
      "query": "fetch bizevents\n| filter event.provider == \"CLC\"\n| filter event.kind == \"BIZ_EVENT\"\n| fieldsAdd etapa = if(event.type == \"patientidentityverificationservice\", \"1. Verificacion de Identidad\", else: if(event.type == \"medicalprofilecreationservice\", \"2. Creacion Ficha Medica\", else: if(event.type == \"specialtyandphysicianselectionservice\", \"3. Seleccion Especialidad\", else: if(event.type == \"appointmentslotreservationservice\", \"4. Reserva de Hora\", else: if(event.type == \"copaymentprocessingservice\", \"5. Pago de Copago\", else: if(event.type == \"appointmentconfirmationservice\", \"6. Confirmacion de Cita\", else: event.type))))))\n| summarize total = count(), by:{etapa}\n| sort etapa asc",
      "visualization": "barChart"
    },
    "9": {
      "title": "Distribucion de Etapas",
      "type": "data",
      "query": "fetch bizevents\n| filter event.provider == \"CLC\"\n| filter event.kind == \"BIZ_EVENT\"\n| fieldsAdd etapa = if(event.type == \"patientidentityverificationservice\", \"Verificacion Identidad\", else: if(event.type == \"medicalprofilecreationservice\", \"Ficha Medica\", else: if(event.type == \"specialtyandphysicianselectionservice\", \"Seleccion Medico\", else: if(event.type == \"appointmentslotreservationservice\", \"Reserva Hora\", else: if(event.type == \"copaymentprocessingservice\", \"Pago Copago\", else: if(event.type == \"appointmentconfirmationservice\", \"Confirmacion Cita\", else: event.type))))))\n| summarize total = count(), by:{etapa}",
      "visualization": "pieChart"
    },
    "10": {
      "type": "markdown",
      "content": "---\n## Tendencia Temporal"
    },
    "11": {
      "title": "Volumen de Registros en el Tiempo",
      "type": "data",
      "query": "fetch bizevents\n| filter event.provider == \"CLC\"\n| filter event.kind == \"BIZ_EVENT\"\n| makeTimeseries count(), interval:5m",
      "visualization": "areaChart"
    },
    "12": {
      "title": "Actividad por Etapa en el Tiempo",
      "type": "data",
      "query": "fetch bizevents\n| filter event.provider == \"CLC\"\n| filter event.kind == \"BIZ_EVENT\"\n| fieldsAdd etapa = if(event.type == \"patientidentityverificationservice\", \"Verificacion Identidad\", else: if(event.type == \"medicalprofilecreationservice\", \"Ficha Medica\", else: if(event.type == \"specialtyandphysicianselectionservice\", \"Seleccion Medico\", else: if(event.type == \"appointmentslotreservationservice\", \"Reserva Hora\", else: if(event.type == \"copaymentprocessingservice\", \"Pago Copago\", else: if(event.type == \"appointmentconfirmationservice\", \"Confirmacion Cita\", else: event.type))))))\n| makeTimeseries count(), by:{etapa}, interval:5m",
      "visualization": "lineChart"
    },
    "13": {
      "type": "markdown",
      "content": "---\n## Resumen por Etapa del Journey\n\nDetalle de volumen de eventos por cada etapa del registro de pacientes."
    },
    "14": {
      "title": "Tabla Resumen por Etapa",
      "type": "data",
      "query": "fetch bizevents\n| filter event.provider == \"CLC\"\n| filter event.kind == \"BIZ_EVENT\"\n| fieldsAdd paso = if(event.type == \"patientidentityverificationservice\", 1, else: if(event.type == \"medicalprofilecreationservice\", 2, else: if(event.type == \"specialtyandphysicianselectionservice\", 3, else: if(event.type == \"appointmentslotreservationservice\", 4, else: if(event.type == \"copaymentprocessingservice\", 5, else: if(event.type == \"appointmentconfirmationservice\", 6, else: 0))))))\n| fieldsAdd etapa = if(paso == 1, \"1. Verificacion de Identidad (RUT)\", else: if(paso == 2, \"2. Creacion Ficha Medica\", else: if(paso == 3, \"3. Seleccion Especialidad y Medico\", else: if(paso == 4, \"4. Reserva de Hora\", else: if(paso == 5, \"5. Pago de Copago (Webpay)\", else: if(paso == 6, \"6. Confirmacion de Cita\", else: \"Otro\"))))))\n| filter paso > 0\n| summarize Eventos = count(), by:{paso, etapa}\n| sort paso asc\n| fields Etapa=etapa, Eventos",
      "visualization": "table"
    },
    "15": {
      "type": "markdown",
      "content": "---\n## Trazabilidad — Detalle Operacional"
    },
    "16": {
      "title": "Ultimos 50 Eventos de Pacientes",
      "type": "data",
      "query": "fetch bizevents\n| filter event.provider == \"CLC\"\n| filter event.kind == \"BIZ_EVENT\"\n| fieldsAdd etapa = if(event.type == \"patientidentityverificationservice\", \"Verificacion Identidad\", else: if(event.type == \"medicalprofilecreationservice\", \"Ficha Medica\", else: if(event.type == \"specialtyandphysicianselectionservice\", \"Seleccion Medico\", else: if(event.type == \"appointmentslotreservationservice\", \"Reserva Hora\", else: if(event.type == \"copaymentprocessingservice\", \"Pago Copago\", else: if(event.type == \"appointmentconfirmationservice\", \"Confirmacion Cita\", else: event.type))))))\n| fields timestamp, Etapa=etapa, TraceId=trace_id, Host=dt.entity.host\n| sort timestamp desc\n| limit 50",
      "visualization": "table"
    },
    "17": {
      "title": "Journeys Completos",
      "type": "data",
      "query": "fetch bizevents\n| filter event.provider == \"CLC\"\n| filter event.kind == \"BIZ_EVENT\"\n| summarize etapas = countDistinct(event.type), by:{trace_id}\n| filter etapas >= 5\n| summarize journeysCompletos = count()",
      "visualization": "singleValue"
    },
    "18": {
      "type": "markdown",
      "content": "---\n## Comparativa entre Empresas"
    },
    "19": {
      "title": "Eventos por Empresa",
      "type": "data",
      "query": "fetch bizevents\n| filter event.kind == \"BIZ_EVENT\"\n| filter event.provider != \"Dynatrace Internal\"\n| summarize total = count(), by:{event.provider}\n| sort total desc",
      "visualization": "barChart"
    },
    "20": {
      "type": "markdown",
      "content": "---\n\n*Dashboard generado por Transafety Ltda. para Clinica Las Condes | Business Observability Demonstrator | Dynatrace*"
    }
  }
}
