
550 S.W.2d 465 (1976)
Barbara Jean ATWOOD (now Parrott), Appellant,
v.
Ronald Kennedy ATWOOD, Appellee.
Supreme Court of Kentucky.
November 12, 1976.
C. David Emerson, Bradley & Emerson, Lexington, for appellant.
D. Frederick Saunders, Brown, Sledd & McCann, P. S. C., Lexington, for appellee.
STERNBERG, Justice.
The custody of the parties' children was changed from appellant to appellee by order of the Fayette Circuit Court, from which order this appeal is prosecuted.
The marriage of Barbara and Ronald was dissolved on September 21, 1973, and custody of their three children was awarded to Barbara. Subsequently, she married Dr. Norman Parrott, a widower with four children, from Paducah, Kentucky. Shortly after their marriage, domestic difficulties arose, and Barbara and her three children returned to Lexington, Kentucky, where the children were enrolled in the public schools. This separation was short-lived because Barbara and Dr. Parrott reconciled, and once again they were together in Paducah, with one difference  the eldest of Barbara's children was left in Lexington with the child's father. However, in the fall of 1975 Barbara and Dr. Parrott again separated and Barbara returned to Lexington, where she filed a petition to dissolve her marriage.
On December 24, 1975, Dr. Parrott executed an affidavit, which was filed with the Judge of the McCracken County Quarterly Court, charging Barbara with being mentally ill and likely to cause injury to herself or others if not immediately restrained. The warrant was withdrawn, however, without any action having been taken thereon. During the time of and even before *466 their first separation, Barbara, Dr. Parrott and his son, Steve, had been consulting regularly with two psychiatrists, Dr. R. Kelley and Dr. M. C. Glasgow. Dr. Kelley, in giving his deposition, among other things, said that he had seen Barbara in his professional capacity eight times since October 10, 1975. Dr. Glasgow treated Steve and, in the course of seeing him on social occasions at the doctor's home and also at the home of the Parrotts, had been around Barbara and Dr. Parrott.
On January 6, 1976, Barbara's first husband, the appellee herein, filed a motion in the Fayette Circuit Court asking that he be awarded custody of the children. He proposed to take the depositions of both Dr. Kelley and Dr. Glasgow, and appellant applied to the court for a protective order prohibiting the taking of these depositions on the grounds "* * * that both Dr. Kelley and Dr. Glasgow are psychiatrists who have seen the Respondent in their professional capacities as psychiatrists, and that any and all communications by and between the aforesaid psychiatrists and the Respondent are privileged under the provisions of KRS 421.215 (1966)." The court denied the motion. The depositions of the two psychiatrists were duly taken and were considered by the court in determining that the custody of the children should be taken from appellant and awarded to appellee.
The issue as stated in appellant's brief is:
"Did the Trial Court err in permitting the taking of depositions of two psychiatrists over the objection of the Appellant, based upon the psychiatrist-patient privilege, and in considering that testimony in arriving at its decision in a change of custody proceeding?"
In a memorandum of law which appellant filed with the chancellor, in speaking of Drs. Kelley and Glasgow, it is stated:
"* * * The two proposed witnesses are psychiatrists who were acting in their professional capacities as psychiatrists. * * *"
At common law there is no privilege existing between doctor and patient or psychiatrist and patient. 44 A.L.R.3d 24. The 1966 regular session of the General Assembly adopted the psychiatrist-patient privilege law, which has been codified as KRS 421.215. By the provisions of this statute, privileged communications between psychiatrist and patient exist with an absolute certainty except in three instances, to-wit:
"(a) When a psychiatrist, in the course of diagnosis or treatment of the patient, determines that the patient is in need of admission to or commitment to a hospital for care of the patient's mental illness;
(b) If a judge finds that the patient, after having been informed that the communications would not be privileged, has made communications to a psychiatrist in the course of a psychiatric examination ordered by the court provided that such communications shall be admissible only on issues involving the patient's mental condition;
(c) In a civil proceeding in which the patient introduces his mental condition as an element of his claim or defense, or, after the patient's death, when said condition is introduced by any party claiming or defending through or as a beneficiary of the patient, and the judge finds that it is more important to the interests of justice that the communication be disclosed than that the relationship between patient and psychiatrist be protected. (Enact.Acts 1966, ch. 121, §§ 1 to 3.)"
A custody action is a civil proceeding of momentous proportions. It not only affects the parents but dramatically and drastically affects the lives of the children. Regardless of the desires of the parents, in making an award of custody the polar star is to determine what is for the best interest of the child. In making this determination, the court must, among other things, consider the following:
"403.270. Custody-Best interest of child shall determine 
(1) The court shall determine custody in accordance with the best interests of the child. The court shall consider all relevant factors including:
* * * * * *

*467 (c) The interaction and interrelationship of the child with his parent or parents, his siblings, and any other person who may significantly affect the child's best interests;
(d) The child's adjustment to his home, school, and community; and
(e) The mental and physical health of all individuals involved."
"403.340. Modification of custody decree 
* * * * * *
(2) If a court of this state has jurisdiction pursuant to the uniform child custody jurisdiction act, the court shall not modify a prior custody decree unless it finds, upon the basis of facts that have arisen since the prior decree or that were unknown to the court at the time of entry of the prior decree, that a change has occurred in the circumstances of the child or his custodian, and that the modification is necessary to serve the best interests of the child. In applying these standards the court shall retain the custodian appointed pursuant to the prior decree unless:
* * * * * *
(c) The child's present environment endangers seriously his physical, mental, moral, or emotional health, and the harm likely to be caused by a change of environment is outweighed by its advantages to him."
KRS 403.270 and KRS 403.340 were enacted at the 1972 regular session of the General Assembly.
In every custody proceeding (KRS 403.270) and in every proceeding for the modification of a custody decree (KRS 403.340), the mental and physical health of not only the parents but of the child is of great concern and importance to the court. Whenever custody of infants is in dispute, the parties seeking custodial authority subject themselves to extensive and acute investigation of all factors relevant to the permanent and, hopefully, proper award of custody. Of major importance is the mental and physical health of all of the parties and whether the child is in an environment likely to endanger his physical, mental, moral or emotional health. Allen v. Department for Human Resources, Ky., 540 S.W.2d 597 (1976).
In seeking the custody of the children in the original petition for dissolution of marriage, appellant made her mental condition an element to be considered by the court in awarding her custody. It makes little difference that the parties have agreed among themselves as to which of them would be the custodial parent. Their agreement is not binding on the court which is at all times primarily concerned with the welfare of the child and thereafter concerned for the parents. Wells v. Wells, Ky., 412 S.W.2d 568 (1967).
The psychiatrist-patient privilege statute was adopted in 1966 and the statutes dealing with award of custody and its modification were adopted in 1972, some six years later. The latter statutes place the mental conditions of all family members squarely in issue. The standard of KRS 421.215(3)(c) has been met by operation of law. We are of the opinion that the depositions of Drs. Kelley and Glasgow were properly taken. The chancellor, in determining modification of the award of custody, was fully justified in considering them.
The judgment is affirmed.
All concur.
