  Theories of qi, yin-yang and wuxing also inform medical works. New systematic medical theories based on these ideas were systematized in a cosmological framework in the Huang Di neijing, a complex and multi-layered text, probably compiled in the first century BCE (Keegan 1988, Unschuld 2003, Yamada 1979). It presents a systematic cosmology that analogizes the body, the state, and the cosmos in systems of “correlative cosmology” (Graham 1986b, Sivin 1995, Lloyd and Sivin 2002). It describes relations and analogies between the body (including the emotions), the state and the cosmos in terms of yin-yang and wuxing. For example, the Huang Di neijing describes correspondence between the articulations of the body and the cosmos, specifically between heaven and earth and the upper and lower parts of the body: