I'm creating a clinical decision support tool for our clinic with access. Without getting into too much detail, our clinic is required to review all medications that we prescribe to patients to make sure the patient has the correct certification to receive that med. Each certification allows for a specific set of drug classes.
In the DB, I have the prescriptions data imported (which includes the drug class code for each patient's Rx), a list of the patient's current certifications, and a crosswalk that outlines what certifications are allowed under each drug class code. So far, I've been able to pull in patients' certs and drug class codes they're currently using into a single query. The final step is to decide whether the patient's drug class code is allowed for under their current certs. This is the part I can't figure out.
Example: Query 1 contains Patient A who is on drug class code 1 and has certification A. Table 1 shows that for drug class code 1 patient must have certs B, C, or D. How do I create a query that gives me an output that says "No Match" for patient 1?
UPDATE: I'm trying to do something like Iif("*[Certs_Combined]*" Like "[Cert1]", "Yes", "No"). [Certs_Combined] is a list of all the patient's current certs in one combined string. [Cert1] is one of the allowable certs for that drug class code. This formula isn't working though. Anyone see an obvious reason why?
In the DB, I have the prescriptions data imported (which includes the drug class code for each patient's Rx), a list of the patient's current certifications, and a crosswalk that outlines what certifications are allowed under each drug class code. So far, I've been able to pull in patients' certs and drug class codes they're currently using into a single query. The final step is to decide whether the patient's drug class code is allowed for under their current certs. This is the part I can't figure out.
Example: Query 1 contains Patient A who is on drug class code 1 and has certification A. Table 1 shows that for drug class code 1 patient must have certs B, C, or D. How do I create a query that gives me an output that says "No Match" for patient 1?
UPDATE: I'm trying to do something like Iif("*[Certs_Combined]*" Like "[Cert1]", "Yes", "No"). [Certs_Combined] is a list of all the patient's current certs in one combined string. [Cert1] is one of the allowable certs for that drug class code. This formula isn't working though. Anyone see an obvious reason why?
Last edited: