Query check ICD10 trach dxs consistent: Difference between revisions

mNo edit summary
m only true for acquired dxs, otherwise the dx might still be there but the trach was on previous location; updated query, confirmed it gets run
 
(28 intermediate revisions by 3 users not shown)
Line 1: Line 1:
{{Data Integrity Check
{{Data Integrity Check
| DIC_summary = Tracheostomy related CCI and ICD10 codes must be consistent with each other.  
| DIC_summary = Tracheostomy related CCI and ICD10 codes must be consistent with each other.  
| DIC_related_concepts = Tracheostomy, has one; Tracheostomy care;  Tracheostomy complication, hemorrhage from site; Tracheostomy complication, malfunction; Tracheostomy complication, NOS; Tracheostomy complication, tracheo-esophageal fistula; Tracheostomy creation
| DIC_related_concepts = Tracheostomy, has one; Tracheostomy complication, hemorrhage from site; Tracheostomy complication, malfunction; Tracheostomy complication, NOS; Tracheostomy complication, tracheo-esophageal fistula; Trach Tube Present (TISS Item)
| DIC_firmness = hard check  
| DIC_firmness = hard check  
| DIC_timing =
| DIC_timing =
| DIC_app = CCMDB.mdb
| DIC_app = CCMDB.accdb
| DIC_coding = Query ''check_ICD10_trach_dxs_consistent''
| DIC_coding = Query ''check_ICD10_trach_dxs_consistent''
| DIC_status = implemented  
| DIC_status = implemented
| DIC_implementation_date = 2019-01-22
| DIC_implementation_date = 2019-01-22
}}
}}


* if any of following dxs are present then must have {{ICD10WithCode|Tracheostomy, has one}}:
* if any trach-implying [[Acquired Diagnoses]] are present then pt must have at least one CCI or ICD10 code that indicates that they have a trach :
** ICD10
** trach-implying dxs
*** {{ICD10WithCode|Tracheostomy complication, hemorrhage from site}}
*** {{ICD10WithCode|Tracheostomy complication, hemorrhage from site}}
*** {{ICD10WithCode|Tracheostomy complication, malfunction}}
*** {{ICD10WithCode|Tracheostomy complication, malfunction}}
*** {{ICD10WithCode|Tracheostomy complication, NOS}}
*** {{ICD10WithCode|Tracheostomy complication, NOS}}
*** {{ICD10WithCode|Tracheostomy complication, tracheo-esophageal fistula}}
*** {{ICD10WithCode|Tracheostomy complication, tracheo-esophageal fistula}}
** CCI
** code that indicates that they have a trach
*** [[Tracheostomy creation]]
*** CCI - {{CCIWithCode| Tracheostomy creation}}
 
*** ICD10 - {{ICD10WithCode|Tracheostomy, has one}}
== old query SQL ==
*** TISS - {{TISS w Nr | Trach Tube Present (TISS Item)}}
{{Collapsable| always = click to expand old query | full =
SELECT l_log.pat_id,
      has_trach_implying_code.pat_id,
      has_hasTrach_code.pat_id,
      *
FROM  ((SELECT l_log.pat_id,
              l_cci_picklist.cci_picklist_code,
              l_icd10.icd10_code
        FROM  (l_log
                INNER JOIN l_cci_picklist
                        ON l_log.pat_id = l_cci_picklist.pat_id)
              INNER JOIN l_icd10
                      ON l_log.pat_id = l_icd10.pat_id
        WHERE  (( ( l_icd10.icd10_code ) = "j95.00"
                  OR ( l_icd10.icd10_code ) = "j95.02"
                  OR ( l_icd10.icd10_code ) = "j95.08"
                  OR ( l_icd10.icd10_code ) = "j95.03" ))
                OR (( ( l_cci_picklist.cci_picklist_code ) = "1.gj.77" ))) AS
      has_trach_implying_code
        RIGHT JOIN l_log
                ON has_trach_implying_code.pat_id = l_log.pat_id)
      LEFT JOIN (SELECT l_icd10.pat_id,
                        l_icd10.icd10_code
                  FROM  l_icd10
                  WHERE  (( ( l_icd10.icd10_code ) = "z93.0" ))) AS
                has_hasTrach_code
              ON l_log.pat_id = has_hasTrach_code.pat_id
WHERE  ( ( ( l_log.pat_id ) = [param] )
        AND ( ( has_trach_implying_code.pat_id ) IS NOT NULL )
        AND ( ( has_hasTrach_code.pat_id ) IS NULL ) )}}


== Log ==
== Log ==
* 2019-04-08 - removed [[Tracheostomy care]] from this query
* 2023-05-03 - tweaked definition and implemented
* 2022-09-28 - definition tweaked
* 2022-02-10 - reviewed the proposed addition and have concerns, flagged for Julie
* 2019-04-08 - removed [[Tracheostomy care]] (retired code) from this query; changed how it is structured altogether to test new rule
* 2019-03-20 - previously this also required one of the above if "has one" was present, but that makes no sense, because one could be present without additional care requirements, so have taken that part out. Ttenbergen 12:45, 2019 March 20 (CDT)
* 2019-03-20 - previously this also required one of the above if "has one" was present, but that makes no sense, because one could be present without additional care requirements, so have taken that part out. Ttenbergen 12:45, 2019 March 20 (CDT)
== Related articles ==
{{Related Articles}}


[[Category:Tracheostomy]]
[[Category:Tracheostomy]]
[[Category:ICD10 Dx check]]
[[Category:ICD10 Dx check]]
[[Category:CCI Px check‎]]
[[Category:CCI Px check‎]]
[[Category:TISS28 check]]