Step 1: Recognise the clinical pattern. A child with upper GI bleeding (hematemesis and melena) plus splenomegaly indicates portal hypertension with bleeding varices.
Step 2: Match the age group. Extrahepatic portal venous obstruction (EHPVO), usually due to portal vein thrombosis or cavernoma, is the most common cause of portal hypertension and variceal bleeding in children, who otherwise have well-preserved liver function.
Step 3: Compare alternatives. NCPF typically presents in young adults rather than a 12-year-old. Cirrhosis is uncommon at this age and would usually show signs of hepatocellular failure. Malaria with DIC causes a bleeding diathesis with fever, not isolated variceal hematemesis with splenomegaly.
Step 4: Conclusion. In a child presenting with variceal bleeding and splenomegaly with preserved liver function, EHPVO is the most probable diagnosis.
The medically correct and printed answer is option 4 (Extrahepatic portal venous obstruction).