To develop, test, and validate an algorithm for diagnosing disease in neonates during an over the telephone referral to a specialist cardiac centre. A draft algorithm requiring only data available to a referring paediatrician was generated. This was modified in the light of a retrospective review of case records. A questionnaire to elicit all the data required by the algorithm was then generated. There followed a prospective three phase evaluation during consecutive over the telephone referrals. This consisted of (a) a conventional phase with unstructured referral consultations, (b) a phase with referrals structured around the questionnaire but independent of the algorithm, and (c) a validation phase with the algorithm (and its previous errors) available during the referral consultation. 59 paediatric centres in south east England and a central specialist paediatric cardiology unit. Consecutive neonates (aged less than 31 days) referred with suspected heart disease. The retrospective review was of records of 174 neonates from 1979. In the prospective evaluation (1987-90) the conventional phase comprised 71 neonates (over 5.5 months), the structured phase 203 neonates (over 14 months), and the validation phase 195 neonates (over 12 months). Diagnostic accuracy (assigning patients to the correct diagnostic category (out of 27)), of the referring paediatrician, the specialist after the referral consultation, and the algorithm as compared with the definitive diagnosis by echocardiography at the specialist centre, and score for the appropriateness of management in transit. Simply structuring the consultation by questionnaire (that is, proceeding from the conventional phase to the structured phase) improved the diagnostic accuracy of both paediatricians (from 34% (24/71 cases) to 48% (97/203) correct) and specialists (from 54% (38/71 cases) to 64% (130/203) correct). The algorithm (structured phase) would have been even more accurate (78% (158/203 cases); p less than 0.01). Management scores in the structured phase were also better than in the conventional phase (80%(162/203 cases)v 58% (41/71) appropriate; p less than 0.01). Management scores would have improved to 91% appropriate (185/203; p less than 0.001) had the algorithmic diagnoses dictated management. The superiority of the algorithm was maintained but not bettered in the validation phase. Applying the algorithm should reduce the morbidity and mortality of neonates with critical heart disease by aiding clinicians in therapeutic decisions for in transit care.