{
    "schema_version": "1.0",
    "phase": "H11.0-P4.3",
    "title": "Multi-Branch Outpatient Visits Legacy Recovery",
    "year": 2025,
    "range_from": "2025-01-01",
    "range_to": "2025-03-31",
    "run_live": true,
    "source_evidence_boundary": "FULL_HISTORICAL_FUNCTION_BODY_RECOVERED",
    "write_operations": "NONE",
    "checks": [
        {
            "name": "target_release_compatible",
            "status": "PASS",
            "detail": "11.0.4.3"
        },
        {
            "name": "full_historical_gmov_contract",
            "status": "PASS",
            "detail": "Exact recovered gmov query contract"
        },
        {
            "name": "three_branch_execution_contract",
            "status": "PASS",
            "detail": "NJCH + JCKH + MNH"
        },
        {
            "name": "no_emergency_exclusion_in_gmov",
            "status": "PASS",
            "detail": "Historical gmov does not exclude ER"
        },
        {
            "name": "independent_current_and_legacy_paths",
            "status": "PASS",
            "detail": "Independent execution paths"
        },
        {
            "name": "real_visits_workspace_integration",
            "status": "PASS",
            "detail": "Visits workspace"
        },
        {
            "name": "bilingual_business_wording",
            "status": "PASS",
            "detail": "EN + AR"
        },
        {
            "name": "oracle_write_operations_none",
            "status": "PASS",
            "detail": "SELECT only"
        },
        {
            "name": "strict_authoritative_sid_resolver_present",
            "status": "PASS",
            "detail": "Deterministic SID-only branch resolver"
        },
        {
            "name": "no_runtime_discovery_scans",
            "status": "PASS",
            "detail": "No DB-link/TNS/filesystem discovery"
        },
        {
            "name": "central_database_uses_proven_direct_factory",
            "status": "PASS",
            "detail": "Proven configured direct Oracle factory"
        },
        {
            "name": "live_year_mode_exact_parity",
            "status": "FAIL",
            "detail": "Execution error"
        },
        {
            "name": "live_date_range_exact_parity",
            "status": "FAIL",
            "detail": "Execution error"
        },
        {
            "name": "live_two_of_two",
            "status": "FAIL",
            "detail": "0/2"
        },
        {
            "name": "all_three_current_branch_paths_resolved",
            "status": "FAIL",
            "detail": "Unavailable because live execution failed"
        },
        {
            "name": "all_three_legacy_branch_paths_resolved",
            "status": "FAIL",
            "detail": "Unavailable because live execution failed"
        },
        {
            "name": "full_historical_source_boundary",
            "status": "PASS",
            "detail": "FULL_HISTORICAL_FUNCTION_BODY_RECOVERED"
        },
        {
            "name": "live_read_only",
            "status": "PASS",
            "detail": "NONE"
        }
    ],
    "parity": null,
    "connectivity_diagnostics": {
        "current": {
            "schema_version": "3.0",
            "policy": "STRICT_CONFIGURED_SID_DIRECT",
            "branches_expected": [
                "njch",
                "jckh",
                "mnh"
            ],
            "resolved": [],
            "access_paths_used": [],
            "attempts": [],
            "write_operations": "NONE"
        },
        "legacy": {
            "schema_version": "3.0",
            "policy": "STRICT_CONFIGURED_SID_DIRECT",
            "branches_expected": [
                "njch",
                "jckh",
                "mnh"
            ],
            "resolved": {
                "njch": {
                    "mode": "CONFIGURED_SID_DIRECT",
                    "source": "USER_CONFIRMED_SQL_DEVELOPER_SUCCESS_SCREENSHOTS",
                    "endpoint": {
                        "host": "10.10.x.x",
                        "port": "1521",
                        "sid": "ORANJC"
                    },
                    "identity": {
                        "global_name": "ORANJC",
                        "db_name": "oranjc",
                        "service_name": "SYS$USERS",
                        "instance_name": "oranjc",
                        "hospital_names": [
                            "New Jeddah Clinic Hospital",
                            "NJCH"
                        ],
                        "fingerprint": "ded88a26a791c46c0aa56a9d5ee00d1b9fd31aca"
                    }
                }
            },
            "access_paths_used": {
                "njch": {
                    "mode": "CONFIGURED_SID_DIRECT",
                    "source": "USER_CONFIRMED_SQL_DEVELOPER_SUCCESS_SCREENSHOTS",
                    "endpoint": {
                        "host": "10.10.x.x",
                        "port": "1521",
                        "sid": "ORANJC"
                    },
                    "identity": {
                        "global_name": "ORANJC",
                        "db_name": "oranjc",
                        "service_name": "SYS$USERS",
                        "instance_name": "oranjc",
                        "hospital_names": [
                            "New Jeddah Clinic Hospital",
                            "NJCH"
                        ],
                        "fingerprint": "ded88a26a791c46c0aa56a9d5ee00d1b9fd31aca"
                    }
                }
            },
            "attempts": {
                "njch": [
                    {
                        "source": "AUTHORITATIVE_ENV_SID_CONTRACT",
                        "status": "PASS",
                        "configured": {
                            "connect_type": "sid",
                            "host": "10.10.x.x",
                            "port": "1521",
                            "sid": "ORANJC",
                            "username_present": true,
                            "password_present": true
                        },
                        "expected": {
                            "connect_type": "sid",
                            "host": "10.10.x.x",
                            "port": "1521",
                            "sid": "ORANJC"
                        }
                    },
                    {
                        "source": "DIRECT_SID_ORACLE_PROBE",
                        "status": "PASS",
                        "identity": {
                            "global_name": "ORANJC",
                            "db_name": "oranjc",
                            "service_name": "SYS$USERS",
                            "instance_name": "oranjc",
                            "hospital_names": [
                                "New Jeddah Clinic Hospital",
                                "NJCH"
                            ],
                            "fingerprint": "ded88a26a791c46c0aa56a9d5ee00d1b9fd31aca"
                        }
                    }
                ],
                "jckh": [
                    {
                        "source": "AUTHORITATIVE_ENV_SID_CONTRACT",
                        "status": "PASS",
                        "configured": {
                            "connect_type": "sid",
                            "host": "10.11.x.x",
                            "port": "1521",
                            "sid": "orajck",
                            "username_present": true,
                            "password_present": true
                        },
                        "expected": {
                            "connect_type": "sid",
                            "host": "10.11.x.x",
                            "port": "1521",
                            "sid": "orajck"
                        }
                    },
                    {
                        "source": "DIRECT_SID_ORACLE_PROBE",
                        "status": "FAIL",
                        "error_code": "ORA-12170",
                        "error": "SQLSTATE[HY000]: pdo_oci_handle_factory: ORA-12170: TNS:Connect timeout occurred\n (ext\\pdo_oci\\oci_driver.c:728)"
                    }
                ]
            },
            "write_operations": "NONE"
        },
        "write_operations": "NONE"
    },
    "live_error": "BRANCH_SID_DIRECT_CONNECT_FAILED branch=JCKH; endpoint=10.11.42.10:1521/SID=orajck; oracle_error=ORA-12170; message=SQLSTATE[HY000]: pdo_oci_handle_factory: ORA-12170: TNS:Connect timeout occurred\n (ext\\pdo_oci\\oci_driver.c:728)",
    "pass_gates": 13,
    "fail_gates": 5,
    "status": "FAIL"
}