Any person subject to this code shall be punished at the direction of a commanding officer if such person, in the presence of a court-martial, a board of officers, a military commission, a court of inquiry, a preliminary hearing or an officer taking a deposition for the state of Kansas or the United States, wrongfully refuses to qualify as a witness or to answer a question after having been directed to do so by the presiding authority.
K.S.A. 48-3062