Thank you for your question. I look forward to working with you to provide you the information you are seeking for educational purposes only.
If you received a medical marijuana card, then the issuance of that card should indeed show up in your medical records and it would be in the state records check. The key is that the law regarding security clearances states specifically "current" users. It says:
Section 3002 says: `(b) Prohibition- After January 1, 2008, the head of a Federal agency may not grant or renew a security clearance for a covered person who is an unlawful user of a controlled substance or an addict (as defined in section 102(1) of the Controlled Substances Act (21 U.S.C. 802)).
(1) IN GENERAL- After January 1, 2008, absent an express written waiver granted in accordance with paragraph (2), the head of a Federal agency may not grant or renew a security clearance described in paragraph (3) for a covered person who--
(A) has been convicted in any court of the United States of a crime, was sentenced to imprisonment for a term exceeding 1 year, and was incarcerated as a result of that sentence for not less than 1 year;
(B) has been discharged or dismissed from the Armed Forces
under dishonorable conditions; or
(C) is mentally incompetent, as determined by an adjudicating authority, based on an evaluation by a duly qualified mental health professional employed by, or acceptable to and approved by, the United States Government and in accordance with the adjudicative guidelines required by subsection (d).
So, by not being a current user, this is not a disqualifier for your service or your clearance.