In the Huangdi Neijing (Yellow Emperor’s Inner Canon) the Universe is composed of various principles, such as Yin and Yang, Qi, and the Five Phases (Wu Xing). The work was one of the first medical treatise to stress the integration of both spiritual and physical treatments as a holistic approach to medical treatment. The Huangdi Neijing is composed of two texts. The first text--Suwen, or Basic Questions--covers the theoretical foundation of Chinese medicine and its diagnostic methods. The Suwen includes topics on Feng Shui, Qigong, acupuncture, herbal medicine, fortune telling, meteorology, and astrology. Because of this vast amount of information it is a major text of Daoism. The second text--Lingshu, or Spiritual Pivot--shares the practical elements of acupuncture therapy in great detail.
The Huangdi Neijing is the earliest reference, I could find, detailing the Five Phases, or Five Elements theory. The Five Phases are Wood, Fire, Earth, Metal, and Water. These phases are not elements, but relationships, and interactions between phenomena, especially Qi. These phases create, destroy, and oppose one another. Each phase is affiliated with various aspects in nature and the human body.
In the Suwen Qi is part of everything that exists, as a life force or spiritual energy that pervades the natural world. The Universe does not exist as a series of discrete entities but as a relationship between Yin and Yang and the Five Phases. When Yin and Yang or the Five Phases transform they do so through the emotive force of Qi. Note that this cosmology addresses the question of change in both the outer world of the cosmos and the inner world of the human body, without regard to a creator. The world is one interconnected whole, where everything and every being moves and acts in a certain way that can either agree or contend with the greater flow, or Dao.
The Suwen asserts that Qi circulates through channels in the human body known as meridians. In this context air Qi combines with grain Qi (or food) to produce gathering Qi. When gathering Qi combines again with original Qi (or essence) normal Qi is produced. Normal Qi is divided again into two components--nutritive and defensive. When the body becomes ill, Qi is described as deficient, sinking, stagnant or rebellious. The symptoms of illness are the products of this bad Qi. You can restore balance by adjusting the Qi flow with a variety of therapeutic techniques, including acupuncture, moving to a different location, changing your diet, or the physical practice of Qigong.