They are both based on the same framework or understanding of the human body and it's vital and energetic functions.
This is the knowledge of Qi or energy, how it moves in the body, what anatomical structures it moves through and how the entire body is a united whole.
The difference between Chinese Medicine and Qigong is that in Chinese Medicine a Doctor will examine and diagnose a patient and prescribe acupuncture and or herbs to treat an ailment. Ailments are observed in terms of their effects on the Qi of the body as well as the physical structures.
A Qigong practitioner is both the Doctor and the Patient and is able to sense the Qi movements in his or her body and 'prescribe' to one's self the specific Qigong (or Qi 'moving' and 'replenishing') exercises required according to the specific 'inner state' exhibited by the body.
The way to sense 'Qi activity' in the body is by developing one's sensitivity and understanding of Qi. The way to develop this sensitivity and understanding is by practice! More specifically, dedicated Qigong practice which is truly an amazing journey and useful because one can maintain one's health in great condition by making adjustments on a daily basis.