State health officials have filed complaints against two medical-marijuana doctors based on information obtained by undercover investigators posing as patients, in what one physician’s lawyers described as a “trap.”

Both complaints, filed on the same day by the Department of Health last year, are awaiting action by administrative law judges. The complaints appear to be the first major actions taken by the state against doctors who order cannabis for patients they deem eligible for the treatment, which was broadly legalized in a 2016 constitutional amendment.