Hi,
I have a cath_procedure table with a procedure_name field that has to be stent-coronary.
Than I have an Event_cath table that keeps the date field for the cath event. Than I have a lookup table LU_CPT_COdes where I can query the CPT code, fields in this table Cptcode and cptdesc., but the lookup table is not related to the others. I woul dlike to join them all together, that I would get everyone who had a "sten-coronary" from the Cath_Procedures table and also whom had CPT code 92980000 or 90290011.
I am not getting the correct number.
SELECT Demographics.Last_Name, Demographics.First_Name, Demographics.Patient_ID, Event_Cath.Date_of_Cath, Cath_CPT_Codes.CPT_Code, Cath_CPT_Codes.Description, Cath_Procedures.Procedure_Name, Cath_CPT_Codes.SDKCode
FROM ((Demographics INNER JOIN Event_Cath ON Demographics.SS_Patient_ID = Event_Cath.SS_Patient_ID) INNER JOIN Cath_Procedures ON Event_Cath.SS_Event_Cath_ID = Cath_Procedures.SS_Event_Cath_ID) INNER JOIN Cath_CPT_Codes ON Event_Cath.SS_Event_Cath_ID = Cath_CPT_Codes.SS_Event_Cath_ID
GROUP BY Demographics.Last_Name, Demographics.First_Name, Demographics.Patient_ID, Event_Cath.Date_of_Cath, Cath_CPT_Codes.CPT_Code, Cath_CPT_Codes.Description, Cath_Procedures.Procedure_Name, Cath_CPT_Codes.SDKCode
HAVING (((Event_Cath.Date_of_Cath) Between [Start_Date] And [End_Date]) AND ((Cath_CPT_Codes.CPT_Code)="92980000") AND ((Cath_Procedures.Procedure_Name)="Stent - Coronary"));
Sometimes one person can have both coated and non coated stents.
Thank you!!
I have a cath_procedure table with a procedure_name field that has to be stent-coronary.
Than I have an Event_cath table that keeps the date field for the cath event. Than I have a lookup table LU_CPT_COdes where I can query the CPT code, fields in this table Cptcode and cptdesc., but the lookup table is not related to the others. I woul dlike to join them all together, that I would get everyone who had a "sten-coronary" from the Cath_Procedures table and also whom had CPT code 92980000 or 90290011.
I am not getting the correct number.
SELECT Demographics.Last_Name, Demographics.First_Name, Demographics.Patient_ID, Event_Cath.Date_of_Cath, Cath_CPT_Codes.CPT_Code, Cath_CPT_Codes.Description, Cath_Procedures.Procedure_Name, Cath_CPT_Codes.SDKCode
FROM ((Demographics INNER JOIN Event_Cath ON Demographics.SS_Patient_ID = Event_Cath.SS_Patient_ID) INNER JOIN Cath_Procedures ON Event_Cath.SS_Event_Cath_ID = Cath_Procedures.SS_Event_Cath_ID) INNER JOIN Cath_CPT_Codes ON Event_Cath.SS_Event_Cath_ID = Cath_CPT_Codes.SS_Event_Cath_ID
GROUP BY Demographics.Last_Name, Demographics.First_Name, Demographics.Patient_ID, Event_Cath.Date_of_Cath, Cath_CPT_Codes.CPT_Code, Cath_CPT_Codes.Description, Cath_Procedures.Procedure_Name, Cath_CPT_Codes.SDKCode
HAVING (((Event_Cath.Date_of_Cath) Between [Start_Date] And [End_Date]) AND ((Cath_CPT_Codes.CPT_Code)="92980000") AND ((Cath_Procedures.Procedure_Name)="Stent - Coronary"));
Sometimes one person can have both coated and non coated stents.
Thank you!!