Residential Mental Health Care Minimum Data Set — Version 05.51
The full specification for RMHC 05.51 can be found on the documentation site.
Main Content
RMHC version 05.51: Rules
Name | Class | Priority | Bulk | Message | Mark | Description | SQL |
---|---|---|---|---|---|---|---|
HrGenDtMissing | Missing | High | No | Missing data - GenDt $GenDt.q | HR.GenDt | Missing data - Data File Generation Date (GenDt) | select State, GenDt from HR where GenDt is null |
RegRegNameMissing | Missing | High | No | Missing data - RegName $RegName.q | REG.RegName | Missing data - Region Name (RegName) | select State, RegId, RegName from REG where RegName is null |
OrgOrgNameMissing | Missing | High | No | Missing data - OrgName $OrgName.q | ORG.OrgName | Missing data - Organisation Name (OrgName) | select State, RegId, OrgId, OrgName from ORG where OrgName is null |
ClusClusNameMissing | Missing | High | No | Missing data - ClusName $ClusName.q | CLUS.ClusName | Missing data - Service Unit Cluster Name (ClusName) | select State, RegId, OrgId, ClusId, ClusName from CLUS where ClusName is null |
ServSUNameMissing | Missing | High | No | Missing data - SUName $SUName.q | SERV.SUName | Missing data - Residential Service Unit Name (SUName) | select State, RegId, OrgId, ClusId, SUId, SUName from SERV where SUName is null |
ServSectorMissing | Missing | High | No | Missing data - Sector $Sector.q | SERV.Sector | Missing data - Sector (Sector) | select State, RegId, OrgId, ClusId, SUId, Sector from SERV where Sector is null |
PerSexMissing | Missing | High | No | Missing data - Sex $Sex.q | PER.Sex | Missing data - Sex (Sex) | select State, RegId, OrgId, ClusId, SUId, PersId, Sex from PER where Sex is null |
PerDoBFlagMissing | Missing | High | No | Missing data - DoBFlag $DoBFlag.q | PER.DoBFlag | Missing data - Estimated Date of Birth Flag (DoBFlag) | select State, RegId, OrgId, ClusId, SUId, PersId, DoBFlag from PER where DoBFlag is null |
PerCoBMissing | Missing | High | No | Missing data - CoB $CoB.q | PER.CoB | Missing data - Country of Birth (CoB) | select State, RegId, OrgId, ClusId, SUId, PersId, CoB from PER where CoB is null |
PerDoBMissing | Missing | High | No | Missing data - DoB $DoB.q | PER.DoB | Missing data - Date of Birth (DoB) | select State, RegId, OrgId, ClusId, SUId, PersId, DoB from PER where DoB is null |
PerIndigStMissing | Missing | High | No | Missing data - IndigSt $IndigSt.q | PER.IndigSt | Missing data - Indigenous Status (IndigSt) | select State, RegId, OrgId, ClusId, SUId, PersId, IndigSt from PER where IndigSt is null |
EpiEpiStartModeMissing | Missing | High | No | Missing data - EpiStartMode $EpiStartMode.q | EPI.EpiStartMode | Missing data - Episode of Residential Care Start Mode (EpiStartMode) | select State, RegId, OrgId, ClusId, SUId, PersId, RecordId, EpiStartMode from EPI where EpiStartMode is null |
EpiEpiEndModeMissing | Missing | High | No | Missing data - EpiEndMode $EpiEndMode.q | EPI.EpiEndMode | Missing data - Episode of Residential Care End Mode (EpiEndMode) | select State, RegId, OrgId, ClusId, SUId, PersId, RecordId, EpiEndMode from EPI where EpiEndMode is null |
EpiDxPrincMissing | Missing | High | No | Missing data - DxPrinc $DxPrinc.q | EPI.DxPrinc | Missing data - Principal Diagnosis (DxPrinc) | select State, RegId, OrgId, ClusId, SUId, PersId, RecordId, DxPrinc from EPI where DxPrinc is null |
EpiLegalStMissing | Missing | High | No | Missing data - LegalSt $LegalSt.q | EPI.LegalSt | Missing data - Mental Health Legal Status (LegalSt) | select State, RegId, OrgId, ClusId, SUId, PersId, RecordId, LegalSt from EPI where LegalSt is null |
EpiMaritalStMissing | Missing | High | No | Missing data - MaritalSt $MaritalSt.q | EPI.MaritalSt | Missing data - Marital Status (MaritalSt) | select State, RegId, OrgId, ClusId, SUId, PersId, RecordId, MaritalSt from EPI where MaritalSt is null |
EpiResAreaMissing | Missing | High | No | Missing data - ResArea $ResArea.q | EPI.ResArea | Missing data - Area of Usual Residence (ResArea) | select State, RegId, OrgId, ClusId, SUId, PersId, RecordId, ResArea from EPI where ResArea is null |
EpiReferralMHRCMissing | Missing | High | No | Missing data - ReferralMHRC $ReferralMHRC.q | EPI.ReferralMHRC | Missing data - Mental Health Care Referral Destination (ReferralMHRC) | select State, RegId, OrgId, ClusId, SUId, PersId, RecordId, ReferralMHRC from EPI where ReferralMHRC is null |
EpiEpiEndDtMissing | Missing | High | No | Missing data - EpiEndDt $EpiEndDt.q | EPI.EpiEndDt | Missing data - Episode of Residential Care End Date (EpiEndDt) | select State, RegId, OrgId, ClusId, SUId, PersId, RecordId, EpiEndDt from EPI where EpiEndDt is null |
EpiEpiStartDtMissing | Missing | High | No | Missing data - EpiStartDt $EpiStartDt.q | EPI.EpiStartDt | Missing data - Episode of Residential Care Start Date (EpiStartDt) | select State, RegId, OrgId, ClusId, SUId, PersId, RecordId, EpiStartDt from EPI where EpiStartDt is null |
EpiNLeaveDaysMissing | Missing | High | No | Missing data - NLeaveDays $NLeaveDays.q | EPI.NLeaveDays | Missing data - Leave Days From Residential Care (NLeaveDays) | select State, RegId, OrgId, ClusId, SUId, PersId, RecordId, NLeaveDays from EPI where NLeaveDays is null |
EpiResStartDtMissing | Missing | High | No | Missing data - ResStartDt $ResStartDt.q | EPI.ResStartDt | Missing data - Residential Stay Start Date (ResStartDt) | select State, RegId, OrgId, ClusId, SUId, PersId, RecordId, ResStartDt from EPI where ResStartDt is null |
PerDoBCount | No | select sum(DoBCount) as PerDoBCountTotal, avg(DoBCount) as PerDoBCountAvg from ( select count(*) as DoBCount from PER where DoB != '9999-09-09' group by DoB ) as tmpcounts | |||||
LowAge | Anomaly | Low | Yes | Age is less than 10 years ($Age) | EPI | Age at Episode End is less than 10 years | select State, RegId, OrgId, ClusId, SUId, PersId, RecordId, Age from EpiAge where Age < 10 |
HighAge | Anomaly | Low | Yes | Age is greater than 124 years ($Age) | EPI | Age is greater than 124 years | select State, RegId, OrgId, ClusId, SUId, PersId, RecordId, Age from EpiAge where Age > 124 |
LowAgeMarriage | Anomaly | Low | No | Age is less than 16 years ($Age) and MaritalSt is $MaritalSt | EPI.MaritalSt | Age is less than 16 years and Marital Status is not 1 (Never married) | select State, RegId, OrgId, ClusId, SUId, PersId, RecordId, Age, MaritalSt from EPI join EpiAge using (State, RegId, OrgId, ClusId, SUId, PersId, RecordId) where Age < 16 and MaritalSt != '1' |
BadSA2Prop | Anomaly | Low | No | Greater than 5% ($prop.perc) of SA2s are invalid ($BadCount in total) | HR.State | Greater than 5% of SA2s (ResArea) are invalid | select State, count(*) as AllCount, bad.BadCount, (bad.BadCount) / count(*)::FLOAT as prop from EPI cross join ( select count(*) as BadCount from error join rule on (rule.id = error.rule) where rule.name = 'Domain' and error.field = 'ResArea' ) as bad group by State, bad.BadCount having (bad.BadCount) / count(*)::FLOAT > 0.05 |
BadMode5EndDt | Inconsistent | High | No | EndMode is $EpiEndMode and EpiEndDt is not 30/June ($EpiEndDt.dmy) | EPI.EpiEndDt | EndMode is 5 (End of reference period) and EpiEndDt is not 30/June | select State, RegId, OrgId, ClusId, SUId, PersId, RecordId, EpiEndDt, EpiEndMode from EPI where EpiEndMode = '5' and not ( (extract(month FROM EpiEndDt) = 6 ) and (extract(day FROM EpiEndDt) = 30) ) |
BadMode5Ref | Inconsistent | High | Yes | EndMode is 5 and ReferralMHRC is not 8 ($ReferralMHRC) | EPI.ReferralMHRC | EndMode is 5 (End of reference period) and ReferralMHRC is not 8 | select State, RegId, OrgId, ClusId, SUId, PersId, RecordId, ReferralMHRC from EPI where EpiEndMode = '5' and ReferralMHRC != '8' |
BadMode1Ref | Inconsistent | High | No | EpiEndMode is $EpiEndMode and ReferralMHRC is not 8 ($ReferralMHRC.qt) | EPI.EpiEndDt | EpiEndMode is 1 (Died) and ReferralMHRC is not 8 (Not applicable) | select State, RegId, OrgId, ClusId, SUId, PersId, RecordId, EpiEndDt, ReferralMHRC from EPI where EpiEndMode = '1' and ReferralMHRC != '8' |
BadMode3StartDt | Inconsistent | High | No | EpiStartMode is $EpiStartMode and EpiStartDt is not 1/July ($EpiStartDt.dmy) | EPI.EpiStartDt | EpiStartMode is 3 (End of reference period) and EpiStartDt is not 1/July | select State, RegId, OrgId, ClusId, SUId, PersId, RecordId, EpiStartDt, EpiStartMode from EPI where EpiStartMode = '3' and not ((extract(month FROM EpiStartDt) = 7) and (extract(day FROM EpiStartDt) = 1)) |
EpiEndModeNot5 | Anomaly | High | Yes | EpiEndDt is 30/June and EpiEndMode is not 5 | EPI.EpiEndMode | EpiEndDt is 30/June EpiEndMode is not 5 (End of reference period) | select State, RegId, OrgId, ClusId, SUId, PersId, RecordId from EPI where EpiEndMode != '5' and ((extract(month FROM EpiEndDt) = 6 ) and (extract( day FROM EpiEndDt) = 30)) |
EpiStartModeNot3 | Anomaly | High | Yes | EpiStartDt is 1/July and EpiStartMode is not 3 | EPI.EpiStartMode | EpiStartDt is 1/July and EpiStartMode is not 3 (Start of a new reference period) | select State, RegId, OrgId, ClusId, SUId, PersId, RecordId from EPI where EpiStartMode != '3' and ((extract(month FROM EpiStartDt) = 7) and (extract( day FROM EpiStartDt) = 1)) |
InvalidZeroEpiDays | Inconsistent | Low | Yes | Episode length is equal to zero without valid EpiStartMode and EpiEndMode. | EPI | Episode length is equal to zero, with EpiStartMode!=3 and if EpiEndMode=5 then the start date is not 30 June. | select State, RegId, OrgId, ClusId, SUId, PersId, RecordId from EPI where ( (EpiEndDt - EpiStartDt - NLeaveDays = 0) and EpiStartMode != '3' and ( EpiEndMode != '5' or ( EpiEndMode='5' and not (extract(month FROM EpiStartDt)::INTEGER = 6 and extract(day FROM EpiStartDt)::INTEGER = 30) ) ) ); |
LowEpiDays | Inconsistent | High | No | Episode Days is less than 0 days ($Days) | EPI.NLeaveDays | Episode Days is less than 0 days | select State, RegId, OrgId, ClusId, SUId, PersId, RecordId, Days from EpiDays where Days < 0 |
EpiDateOverlap | Inconsistent | High | No | EpiStartDt $EpiStartDt.dmy on/before EpiEndDt $prevEpiEndDt.dmy of earlier EPI | EPI.StartDt | Start date for and episode of care is before or equal to the end date for another episode of care for a unique PersId (within a unit). | select * from EpiPrevGap where EpiStartDt <= prevEpiEndDt |
EpiAdjacentDate | Anomaly | High | Yes | EpiStartDt $EpiStartDt.dmy adjacent to EpiEndDt $prevEpiEndDt.dmy of earlier EPI | EPI.StartDt | Start date for and episode of care is immediately adjacent to the end date of the preceding episode of care for a unique PersId (within a unit). | select * from EpiPrevGap where EpiStartDt = 1 + prevEpiEndDt |
EpiStartDtBeforeDoB | Inconsistent | High | No | EpiStartDt ($EpiStartDt.dmy) is before DoB ($DoB.dmy) | EPI.EpiStartDt | EpiStartDt is before DoB | select State, RegId, OrgId, ClusId, SUId, PersId, RecordId, EpiStartDt, DoB from EPI join PER using (State, RegId, OrgId, ClusId, SUId, PersId) where DoB != '9999-09-09' and EpiStartDt < DoB |
EpiEndDtBeforeDoB | Inconsistent | High | No | EpiEndDt ($EpiEndDt.dmy) is before DoB ($DoB.dmy) | EPI.EpiEndDt | EpiEndDt is before DoB | select State, RegId, OrgId, ClusId, SUId, PersId, RecordId, EpiEndDt, DoB from EPI join PER using (State, RegId, OrgId, ClusId, SUId, PersId) where DoB != '9999-09-09' and EpiEndDt < DoB |
ResStartDtBeforeDoB | Inconsistent | High | No | ResStartDt ($ResStartDt.dmy) is before DoB ($DoB.dmy) | EPI.ResStartDt | ResStartDt is before DoB | select State, RegId, OrgId, ClusId, SUId, PersId, RecordId, ResStartDt, DoB from EPI join PER using (State, RegId, OrgId, ClusId, SUId, PersId) where DoB != '9999-09-09' and ResStartDt < DoB |
EpiEndBeforeResStart | Inconsistent | High | No | EpiEndDt ($EpiEndDt) is before ResStartDt ($ResStartDt) | EPI.EpiEndDt | The EpiStartDt cannot be after the ResEndDt | select State, RegId, OrgId, ClusId, SUId, PersId, RecordId, EpiEndDt, ResStartDt from EPI where EpiEndDt < ResStartDt |
ResStartBeforeEpiStart | Inconsistent | High | No | ResStartDt ($ResStartDt) must not be later than EpiStartDt ($EpiStartDt) | EPI.ResStartDt | The ResStartDt cannot be after the EpiStartDt | select State, RegId, OrgId, ClusId, SUId, PersId, RecordId, EpiStartDt, ResStartDt from EPI where ResStartDt > EpiStartDt |
BadDxPrincF | Inconsistent | High | No | Diagnosis ($DxPrinc) and Sex ($Sex) is not female | EPI.DxPrinc | The following diagnosis codes should only apply to females: 'F53.0 ', 'F53.1 ', 'F53.8 ', 'F53.9 ', 'F32.01', 'F32.11', 'F32.21', 'F32.31', 'F32.81', 'F32.91', 'O99.3 ', 'F52.5 ' | select State, RegId, OrgId, ClusId, SUId, PersId, RecordId, DxPrinc, Sex from EPI join PER using (State, RegId, OrgId, ClusId, SUId, PersId) where DxPrinc in ('F53.0 ', 'F53.1 ', 'F53.8 ', 'F53.9 ', 'F32.01', 'F32.11', 'F32.21', 'F32.31', 'F32.81', 'F32.91', 'O99.3 ', 'F52.5 ') and Sex != '2' |
BadDxPrincM | Inconsistent | High | No | Diagnosis ($DxPrinc) and Sex ($Sex) is not male | EPI.DxPrinc | The following diagnosis codes should only apply to males: 'F52.4 ' | select State, RegId, OrgId, ClusId, SUId, PersId, RecordId, DxPrinc, Sex from EPI join PER using (State, RegId, OrgId, ClusId, SUId, PersId) where DxPrinc in ('F52.4 ') and Sex != '1' |
BadDxPrincPpm | Inconsistent | Low | No | Diagnosis ($DxPrinc) and Age ($Age) not between 10 and 60 | EPI.DxPrinc | The following diagnosis codes should only apply to ages 10-60: 'F53 ', 'F53.0 ', 'F53.1 ', 'F53.8 ', 'F53.9 ', 'F32.01', 'F32.11', 'F32.21', 'F32.31', 'F32.81', 'F32.91', 'O99.3 ' | select State, RegId, OrgId, ClusId, SUId, PersId, RecordId, DxPrinc, Age from EPI join EpiAge using (State, RegId, OrgId, ClusId, SUId, PersId, RecordId) where DxPrinc in ('F53 ', 'F53.0 ', 'F53.1 ', 'F53.8 ', 'F53.9 ', 'F32.01', 'F32.11', 'F32.21', 'F32.31', 'F32.81', 'F32.91', 'O99.3 ') and Age not between 10 and 60 |
BadDxPrincAd | Inconsistent | Low | No | Diagnosis ($DxPrinc) and Age ($Age) less than 15 | EPI.DxPrinc | The following diagnosis codes should not apply to ages less than 15: 'F03 ', 'F01.0 ', 'F01.1 ', 'F01.2 ', 'F01.3 ', 'F01.8 ', 'F01.9 ' | select State, RegId, OrgId, ClusId, SUId, PersId, RecordId, DxPrinc, Age from EPI join EpiAge using (State, RegId, OrgId, ClusId, SUId, PersId, RecordId) where DxPrinc in ('F03 ', 'F01.0 ', 'F01.1 ', 'F01.2 ', 'F01.3 ', 'F01.8 ', 'F01.9 ') and Age < 15 |
BadDxPrincLowAge | Inconsistent | Low | No | Diagnosis ($DxPrinc) and Age ($Age) less than 1 | EPI.DxPrinc | The following diagnosis codes should not apply to ages less than 1: 'F80.0 ', 'F80.1 ', 'F80.2 ', 'F80.3 ', 'F80.8 ', 'F80.9 ', 'F81.0 ', 'F81.1 ', 'F81.2 ', 'F81.3 ', 'F81.8 ', 'F81.9 ', 'F82 ', 'F83 ', 'F88 ', 'F89 ' | select State, RegId, OrgId, ClusId, SUId, PersId, RecordId, DxPrinc, Age from EPI join EpiAge using (State, RegId, OrgId, ClusId, SUId, PersId, RecordId) where DxPrinc in ('F80.0 ', 'F80.1 ', 'F80.2 ', 'F80.3 ', 'F80.8 ', 'F80.9 ', 'F81.0 ', 'F81.1 ', 'F81.2 ', 'F81.3 ', 'F81.8 ', 'F81.9 ', 'F82 ', 'F83 ', 'F88 ', 'F89 ') and Age < 1 |
BadDxAdd01F | Inconsistent | High | No | Diagnosis ($DxAdd01) and Sex ($Sex) is not female | EPI.DxAdd01 | The following diagnosis codes should only apply to females: 'F53.0 ', 'F53.1 ', 'F53.8 ', 'F53.9 ', 'F32.01', 'F32.11', 'F32.21', 'F32.31', 'F32.81', 'F32.91', 'O99.3 ', 'F52.5 ' | select State, RegId, OrgId, ClusId, SUId, PersId, RecordId, DxAdd01, Sex from EPI join PER using (State, RegId, OrgId, ClusId, SUId, PersId) where DxAdd01 in ('F53.0 ', 'F53.1 ', 'F53.8 ', 'F53.9 ', 'F32.01', 'F32.11', 'F32.21', 'F32.31', 'F32.81', 'F32.91', 'O99.3 ', 'F52.5 ') and Sex != '2' |
BadDxAdd01M | Inconsistent | High | No | Diagnosis ($DxAdd01) and Sex ($Sex) is not male | EPI.DxAdd01 | The following diagnosis codes should only apply to males: 'F52.4 ' | select State, RegId, OrgId, ClusId, SUId, PersId, RecordId, DxAdd01, Sex from EPI join PER using (State, RegId, OrgId, ClusId, SUId, PersId) where DxAdd01 in ('F52.4 ') and Sex != '1' |
BadDxAdd01Ppm | Inconsistent | Low | No | Diagnosis ($DxAdd01) and Age ($Age) not between 10 and 60 | EPI.DxAdd01 | The following diagnosis codes should only apply to ages 10-60: 'F53 ', 'F53.0 ', 'F53.1 ', 'F53.8 ', 'F53.9 ', 'F32.01', 'F32.11', 'F32.21', 'F32.31', 'F32.81', 'F32.91', 'O99.3 ' | select State, RegId, OrgId, ClusId, SUId, PersId, RecordId, DxAdd01, Age from EPI join EpiAge using (State, RegId, OrgId, ClusId, SUId, PersId, RecordId) where DxAdd01 in ('F53 ', 'F53.0 ', 'F53.1 ', 'F53.8 ', 'F53.9 ', 'F32.01', 'F32.11', 'F32.21', 'F32.31', 'F32.81', 'F32.91', 'O99.3 ') and Age not between 10 and 60 |
BadDxAdd01Ad | Inconsistent | Low | No | Diagnosis ($DxAdd01) and Age ($Age) less than 15 | EPI.DxAdd01 | The following diagnosis codes should not apply to ages less than 15: 'F03 ', 'F01.0 ', 'F01.1 ', 'F01.2 ', 'F01.3 ', 'F01.8 ', 'F01.9 ' | select State, RegId, OrgId, ClusId, SUId, PersId, RecordId, DxAdd01, Age from EPI join EpiAge using (State, RegId, OrgId, ClusId, SUId, PersId, RecordId) where DxAdd01 in ('F03 ', 'F01.0 ', 'F01.1 ', 'F01.2 ', 'F01.3 ', 'F01.8 ', 'F01.9 ') and Age < 15 |
BadDxAdd01LowAge | Inconsistent | Low | No | Diagnosis ($DxAdd01) and Age ($Age) less than 1 | EPI.DxAdd01 | The following diagnosis codes should not apply to ages less than 1: 'F80.0 ', 'F80.1 ', 'F80.2 ', 'F80.3 ', 'F80.8 ', 'F80.9 ', 'F81.0 ', 'F81.1 ', 'F81.2 ', 'F81.3 ', 'F81.8 ', 'F81.9 ', 'F82 ', 'F83 ', 'F88 ', 'F89 ' | select State, RegId, OrgId, ClusId, SUId, PersId, RecordId, DxAdd01, Age from EPI join EpiAge using (State, RegId, OrgId, ClusId, SUId, PersId, RecordId) where DxAdd01 in ('F80.0 ', 'F80.1 ', 'F80.2 ', 'F80.3 ', 'F80.8 ', 'F80.9 ', 'F81.0 ', 'F81.1 ', 'F81.2 ', 'F81.3 ', 'F81.8 ', 'F81.9 ', 'F82 ', 'F83 ', 'F88 ', 'F89 ') and Age < 1 |
BadDxAdd02F | Inconsistent | High | No | Diagnosis ($DxAdd02) and Sex ($Sex) is not female | EPI.DxAdd02 | The following diagnosis codes should only apply to females: 'F53.0 ', 'F53.1 ', 'F53.8 ', 'F53.9 ', 'F32.01', 'F32.11', 'F32.21', 'F32.31', 'F32.81', 'F32.91', 'O99.3 ', 'F52.5 ' | select State, RegId, OrgId, ClusId, SUId, PersId, RecordId, DxAdd02, Sex from EPI join PER using (State, RegId, OrgId, ClusId, SUId, PersId) where DxAdd02 in ('F53.0 ', 'F53.1 ', 'F53.8 ', 'F53.9 ', 'F32.01', 'F32.11', 'F32.21', 'F32.31', 'F32.81', 'F32.91', 'O99.3 ', 'F52.5 ') and Sex != '2' |
BadDxAdd02M | Inconsistent | High | No | Diagnosis ($DxAdd02) and Sex ($Sex) is not male | EPI.DxAdd02 | The following diagnosis codes should only apply to males: 'F52.4 ' | select State, RegId, OrgId, ClusId, SUId, PersId, RecordId, DxAdd02, Sex from EPI join PER using (State, RegId, OrgId, ClusId, SUId, PersId) where DxAdd02 in ('F52.4 ') and Sex != '1' |
BadDxAdd02Ppm | Inconsistent | Low | No | Diagnosis ($DxAdd02) and Age ($Age) not between 10 and 60 | EPI.DxAdd02 | The following diagnosis codes should only apply to ages 10-60: 'F53 ', 'F53.0 ', 'F53.1 ', 'F53.8 ', 'F53.9 ', 'F32.01', 'F32.11', 'F32.21', 'F32.31', 'F32.81', 'F32.91', 'O99.3 ' | select State, RegId, OrgId, ClusId, SUId, PersId, RecordId, DxAdd02, Age from EPI join EpiAge using (State, RegId, OrgId, ClusId, SUId, PersId, RecordId) where DxAdd02 in ('F53 ', 'F53.0 ', 'F53.1 ', 'F53.8 ', 'F53.9 ', 'F32.01', 'F32.11', 'F32.21', 'F32.31', 'F32.81', 'F32.91', 'O99.3 ') and Age not between 10 and 60 |
BadDxAdd02Ad | Inconsistent | Low | No | Diagnosis ($DxAdd02) and Age ($Age) less than 15 | EPI.DxAdd02 | The following diagnosis codes should not apply to ages less than 15: 'F03 ', 'F01.0 ', 'F01.1 ', 'F01.2 ', 'F01.3 ', 'F01.8 ', 'F01.9 ' | select State, RegId, OrgId, ClusId, SUId, PersId, RecordId, DxAdd02, Age from EPI join EpiAge using (State, RegId, OrgId, ClusId, SUId, PersId, RecordId) where DxAdd02 in ('F03 ', 'F01.0 ', 'F01.1 ', 'F01.2 ', 'F01.3 ', 'F01.8 ', 'F01.9 ') and Age < 15 |
BadDxAdd02LowAge | Inconsistent | Low | No | Diagnosis ($DxAdd02) and Age ($Age) less than 1 | EPI.DxAdd02 | The following diagnosis codes should not apply to ages less than 1: 'F80.0 ', 'F80.1 ', 'F80.2 ', 'F80.3 ', 'F80.8 ', 'F80.9 ', 'F81.0 ', 'F81.1 ', 'F81.2 ', 'F81.3 ', 'F81.8 ', 'F81.9 ', 'F82 ', 'F83 ', 'F88 ', 'F89 ' | select State, RegId, OrgId, ClusId, SUId, PersId, RecordId, DxAdd02, Age from EPI join EpiAge using (State, RegId, OrgId, ClusId, SUId, PersId, RecordId) where DxAdd02 in ('F80.0 ', 'F80.1 ', 'F80.2 ', 'F80.3 ', 'F80.8 ', 'F80.9 ', 'F81.0 ', 'F81.1 ', 'F81.2 ', 'F81.3 ', 'F81.8 ', 'F81.9 ', 'F82 ', 'F83 ', 'F88 ', 'F89 ') and Age < 1 |
BadDxAdd03F | Inconsistent | High | No | Diagnosis ($DxAdd03) and Sex ($Sex) is not female | EPI.DxAdd03 | The following diagnosis codes should only apply to females: 'F53.0 ', 'F53.1 ', 'F53.8 ', 'F53.9 ', 'F32.01', 'F32.11', 'F32.21', 'F32.31', 'F32.81', 'F32.91', 'O99.3 ', 'F52.5 ' | select State, RegId, OrgId, ClusId, SUId, PersId, RecordId, DxAdd03, Sex from EPI join PER using (State, RegId, OrgId, ClusId, SUId, PersId) where DxAdd03 in ('F53.0 ', 'F53.1 ', 'F53.8 ', 'F53.9 ', 'F32.01', 'F32.11', 'F32.21', 'F32.31', 'F32.81', 'F32.91', 'O99.3 ', 'F52.5 ') and Sex != '2' |
BadDxAdd03M | Inconsistent | High | No | Diagnosis ($DxAdd03) and Sex ($Sex) is not male | EPI.DxAdd03 | The following diagnosis codes should only apply to males: 'F52.4 ' | select State, RegId, OrgId, ClusId, SUId, PersId, RecordId, DxAdd03, Sex from EPI join PER using (State, RegId, OrgId, ClusId, SUId, PersId) where DxAdd03 in ('F52.4 ') and Sex != '1' |
BadDxAdd03Ppm | Inconsistent | Low | No | Diagnosis ($DxAdd03) and Age ($Age) not between 10 and 60 | EPI.DxAdd03 | The following diagnosis codes should only apply to ages 10-60: 'F53 ', 'F53.0 ', 'F53.1 ', 'F53.8 ', 'F53.9 ', 'F32.01', 'F32.11', 'F32.21', 'F32.31', 'F32.81', 'F32.91', 'O99.3 ' | select State, RegId, OrgId, ClusId, SUId, PersId, RecordId, DxAdd03, Age from EPI join EpiAge using (State, RegId, OrgId, ClusId, SUId, PersId, RecordId) where DxAdd03 in ('F53 ', 'F53.0 ', 'F53.1 ', 'F53.8 ', 'F53.9 ', 'F32.01', 'F32.11', 'F32.21', 'F32.31', 'F32.81', 'F32.91', 'O99.3 ') and Age not between 10 and 60 |
BadDxAdd03Ad | Inconsistent | Low | No | Diagnosis ($DxAdd03) and Age ($Age) less than 15 | EPI.DxAdd03 | The following diagnosis codes should not apply to ages less than 15: 'F03 ', 'F01.0 ', 'F01.1 ', 'F01.2 ', 'F01.3 ', 'F01.8 ', 'F01.9 ' | select State, RegId, OrgId, ClusId, SUId, PersId, RecordId, DxAdd03, Age from EPI join EpiAge using (State, RegId, OrgId, ClusId, SUId, PersId, RecordId) where DxAdd03 in ('F03 ', 'F01.0 ', 'F01.1 ', 'F01.2 ', 'F01.3 ', 'F01.8 ', 'F01.9 ') and Age < 15 |
BadDxAdd03LowAge | Inconsistent | Low | No | Diagnosis ($DxAdd03) and Age ($Age) less than 1 | EPI.DxAdd03 | The following diagnosis codes should not apply to ages less than 1: 'F80.0 ', 'F80.1 ', 'F80.2 ', 'F80.3 ', 'F80.8 ', 'F80.9 ', 'F81.0 ', 'F81.1 ', 'F81.2 ', 'F81.3 ', 'F81.8 ', 'F81.9 ', 'F82 ', 'F83 ', 'F88 ', 'F89 ' | select State, RegId, OrgId, ClusId, SUId, PersId, RecordId, DxAdd03, Age from EPI join EpiAge using (State, RegId, OrgId, ClusId, SUId, PersId, RecordId) where DxAdd03 in ('F80.0 ', 'F80.1 ', 'F80.2 ', 'F80.3 ', 'F80.8 ', 'F80.9 ', 'F81.0 ', 'F81.1 ', 'F81.2 ', 'F81.3 ', 'F81.8 ', 'F81.9 ', 'F82 ', 'F83 ', 'F88 ', 'F89 ') and Age < 1 |
BadDxAdd04F | Inconsistent | High | No | Diagnosis ($DxAdd04) and Sex ($Sex) is not female | EPI.DxAdd04 | The following diagnosis codes should only apply to females: 'F53.0 ', 'F53.1 ', 'F53.8 ', 'F53.9 ', 'F32.01', 'F32.11', 'F32.21', 'F32.31', 'F32.81', 'F32.91', 'O99.3 ', 'F52.5 ' | select State, RegId, OrgId, ClusId, SUId, PersId, RecordId, DxAdd04, Sex from EPI join PER using (State, RegId, OrgId, ClusId, SUId, PersId) where DxAdd04 in ('F53.0 ', 'F53.1 ', 'F53.8 ', 'F53.9 ', 'F32.01', 'F32.11', 'F32.21', 'F32.31', 'F32.81', 'F32.91', 'O99.3 ', 'F52.5 ') and Sex != '2' |
BadDxAdd04M | Inconsistent | High | No | Diagnosis ($DxAdd04) and Sex ($Sex) is not male | EPI.DxAdd04 | The following diagnosis codes should only apply to males: 'F52.4 ' | select State, RegId, OrgId, ClusId, SUId, PersId, RecordId, DxAdd04, Sex from EPI join PER using (State, RegId, OrgId, ClusId, SUId, PersId) where DxAdd04 in ('F52.4 ') and Sex != '1' |
BadDxAdd04Ppm | Inconsistent | Low | No | Diagnosis ($DxAdd04) and Age ($Age) not between 10 and 60 | EPI.DxAdd04 | The following diagnosis codes should only apply to ages 10-60: 'F53 ', 'F53.0 ', 'F53.1 ', 'F53.8 ', 'F53.9 ', 'F32.01', 'F32.11', 'F32.21', 'F32.31', 'F32.81', 'F32.91', 'O99.3 ' | select State, RegId, OrgId, ClusId, SUId, PersId, RecordId, DxAdd04, Age from EPI join EpiAge using (State, RegId, OrgId, ClusId, SUId, PersId, RecordId) where DxAdd04 in ('F53 ', 'F53.0 ', 'F53.1 ', 'F53.8 ', 'F53.9 ', 'F32.01', 'F32.11', 'F32.21', 'F32.31', 'F32.81', 'F32.91', 'O99.3 ') and Age not between 10 and 60 |
BadDxAdd04Ad | Inconsistent | Low | No | Diagnosis ($DxAdd04) and Age ($Age) less than 15 | EPI.DxAdd04 | The following diagnosis codes should not apply to ages less than 15: 'F03 ', 'F01.0 ', 'F01.1 ', 'F01.2 ', 'F01.3 ', 'F01.8 ', 'F01.9 ' | select State, RegId, OrgId, ClusId, SUId, PersId, RecordId, DxAdd04, Age from EPI join EpiAge using (State, RegId, OrgId, ClusId, SUId, PersId, RecordId) where DxAdd04 in ('F03 ', 'F01.0 ', 'F01.1 ', 'F01.2 ', 'F01.3 ', 'F01.8 ', 'F01.9 ') and Age < 15 |
BadDxAdd04LowAge | Inconsistent | Low | No | Diagnosis ($DxAdd04) and Age ($Age) less than 1 | EPI.DxAdd04 | The following diagnosis codes should not apply to ages less than 1: 'F80.0 ', 'F80.1 ', 'F80.2 ', 'F80.3 ', 'F80.8 ', 'F80.9 ', 'F81.0 ', 'F81.1 ', 'F81.2 ', 'F81.3 ', 'F81.8 ', 'F81.9 ', 'F82 ', 'F83 ', 'F88 ', 'F89 ' | select State, RegId, OrgId, ClusId, SUId, PersId, RecordId, DxAdd04, Age from EPI join EpiAge using (State, RegId, OrgId, ClusId, SUId, PersId, RecordId) where DxAdd04 in ('F80.0 ', 'F80.1 ', 'F80.2 ', 'F80.3 ', 'F80.8 ', 'F80.9 ', 'F81.0 ', 'F81.1 ', 'F81.2 ', 'F81.3 ', 'F81.8 ', 'F81.9 ', 'F82 ', 'F83 ', 'F88 ', 'F89 ') and Age < 1 |
BadDxAdd05F | Inconsistent | High | No | Diagnosis ($DxAdd05) and Sex ($Sex) is not female | EPI.DxAdd05 | The following diagnosis codes should only apply to females: 'F53.0 ', 'F53.1 ', 'F53.8 ', 'F53.9 ', 'F32.01', 'F32.11', 'F32.21', 'F32.31', 'F32.81', 'F32.91', 'O99.3 ', 'F52.5 ' | select State, RegId, OrgId, ClusId, SUId, PersId, RecordId, DxAdd05, Sex from EPI join PER using (State, RegId, OrgId, ClusId, SUId, PersId) where DxAdd05 in ('F53.0 ', 'F53.1 ', 'F53.8 ', 'F53.9 ', 'F32.01', 'F32.11', 'F32.21', 'F32.31', 'F32.81', 'F32.91', 'O99.3 ', 'F52.5 ') and Sex != '2' |
BadDxAdd05M | Inconsistent | High | No | Diagnosis ($DxAdd05) and Sex ($Sex) is not male | EPI.DxAdd05 | The following diagnosis codes should only apply to males: 'F52.4 ' | select State, RegId, OrgId, ClusId, SUId, PersId, RecordId, DxAdd05, Sex from EPI join PER using (State, RegId, OrgId, ClusId, SUId, PersId) where DxAdd05 in ('F52.4 ') and Sex != '1' |
BadDxAdd05Ppm | Inconsistent | Low | No | Diagnosis ($DxAdd05) and Age ($Age) not between 10 and 60 | EPI.DxAdd05 | The following diagnosis codes should only apply to ages 10-60: 'F53 ', 'F53.0 ', 'F53.1 ', 'F53.8 ', 'F53.9 ', 'F32.01', 'F32.11', 'F32.21', 'F32.31', 'F32.81', 'F32.91', 'O99.3 ' | select State, RegId, OrgId, ClusId, SUId, PersId, RecordId, DxAdd05, Age from EPI join EpiAge using (State, RegId, OrgId, ClusId, SUId, PersId, RecordId) where DxAdd05 in ('F53 ', 'F53.0 ', 'F53.1 ', 'F53.8 ', 'F53.9 ', 'F32.01', 'F32.11', 'F32.21', 'F32.31', 'F32.81', 'F32.91', 'O99.3 ') and Age not between 10 and 60 |
BadDxAdd05Ad | Inconsistent | Low | No | Diagnosis ($DxAdd05) and Age ($Age) less than 15 | EPI.DxAdd05 | The following diagnosis codes should not apply to ages less than 15: 'F03 ', 'F01.0 ', 'F01.1 ', 'F01.2 ', 'F01.3 ', 'F01.8 ', 'F01.9 ' | select State, RegId, OrgId, ClusId, SUId, PersId, RecordId, DxAdd05, Age from EPI join EpiAge using (State, RegId, OrgId, ClusId, SUId, PersId, RecordId) where DxAdd05 in ('F03 ', 'F01.0 ', 'F01.1 ', 'F01.2 ', 'F01.3 ', 'F01.8 ', 'F01.9 ') and Age < 15 |
BadDxAdd05LowAge | Inconsistent | Low | No | Diagnosis ($DxAdd05) and Age ($Age) less than 1 | EPI.DxAdd05 | The following diagnosis codes should not apply to ages less than 1: 'F80.0 ', 'F80.1 ', 'F80.2 ', 'F80.3 ', 'F80.8 ', 'F80.9 ', 'F81.0 ', 'F81.1 ', 'F81.2 ', 'F81.3 ', 'F81.8 ', 'F81.9 ', 'F82 ', 'F83 ', 'F88 ', 'F89 ' | select State, RegId, OrgId, ClusId, SUId, PersId, RecordId, DxAdd05, Age from EPI join EpiAge using (State, RegId, OrgId, ClusId, SUId, PersId, RecordId) where DxAdd05 in ('F80.0 ', 'F80.1 ', 'F80.2 ', 'F80.3 ', 'F80.8 ', 'F80.9 ', 'F81.0 ', 'F81.1 ', 'F81.2 ', 'F81.3 ', 'F81.8 ', 'F81.9 ', 'F82 ', 'F83 ', 'F88 ', 'F89 ') and Age < 1 |
BadDxAdd06F | Inconsistent | High | No | Diagnosis ($DxAdd06) and Sex ($Sex) is not female | EPI.DxAdd06 | The following diagnosis codes should only apply to females: 'F53.0 ', 'F53.1 ', 'F53.8 ', 'F53.9 ', 'F32.01', 'F32.11', 'F32.21', 'F32.31', 'F32.81', 'F32.91', 'O99.3 ', 'F52.5 ' | select State, RegId, OrgId, ClusId, SUId, PersId, RecordId, DxAdd06, Sex from EPI join PER using (State, RegId, OrgId, ClusId, SUId, PersId) where DxAdd06 in ('F53.0 ', 'F53.1 ', 'F53.8 ', 'F53.9 ', 'F32.01', 'F32.11', 'F32.21', 'F32.31', 'F32.81', 'F32.91', 'O99.3 ', 'F52.5 ') and Sex != '2' |
BadDxAdd06M | Inconsistent | High | No | Diagnosis ($DxAdd06) and Sex ($Sex) is not male | EPI.DxAdd06 | The following diagnosis codes should only apply to males: 'F52.4 ' | select State, RegId, OrgId, ClusId, SUId, PersId, RecordId, DxAdd06, Sex from EPI join PER using (State, RegId, OrgId, ClusId, SUId, PersId) where DxAdd06 in ('F52.4 ') and Sex != '1' |
BadDxAdd06Ppm | Inconsistent | Low | No | Diagnosis ($DxAdd06) and Age ($Age) not between 10 and 60 | EPI.DxAdd06 | The following diagnosis codes should only apply to ages 10-60: 'F53 ', 'F53.0 ', 'F53.1 ', 'F53.8 ', 'F53.9 ', 'F32.01', 'F32.11', 'F32.21', 'F32.31', 'F32.81', 'F32.91', 'O99.3 ' | select State, RegId, OrgId, ClusId, SUId, PersId, RecordId, DxAdd06, Age from EPI join EpiAge using (State, RegId, OrgId, ClusId, SUId, PersId, RecordId) where DxAdd06 in ('F53 ', 'F53.0 ', 'F53.1 ', 'F53.8 ', 'F53.9 ', 'F32.01', 'F32.11', 'F32.21', 'F32.31', 'F32.81', 'F32.91', 'O99.3 ') and Age not between 10 and 60 |
BadDxAdd06Ad | Inconsistent | Low | No | Diagnosis ($DxAdd06) and Age ($Age) less than 15 | EPI.DxAdd06 | The following diagnosis codes should not apply to ages less than 15: 'F03 ', 'F01.0 ', 'F01.1 ', 'F01.2 ', 'F01.3 ', 'F01.8 ', 'F01.9 ' | select State, RegId, OrgId, ClusId, SUId, PersId, RecordId, DxAdd06, Age from EPI join EpiAge using (State, RegId, OrgId, ClusId, SUId, PersId, RecordId) where DxAdd06 in ('F03 ', 'F01.0 ', 'F01.1 ', 'F01.2 ', 'F01.3 ', 'F01.8 ', 'F01.9 ') and Age < 15 |
BadDxAdd06LowAge | Inconsistent | Low | No | Diagnosis ($DxAdd06) and Age ($Age) less than 1 | EPI.DxAdd06 | The following diagnosis codes should not apply to ages less than 1: 'F80.0 ', 'F80.1 ', 'F80.2 ', 'F80.3 ', 'F80.8 ', 'F80.9 ', 'F81.0 ', 'F81.1 ', 'F81.2 ', 'F81.3 ', 'F81.8 ', 'F81.9 ', 'F82 ', 'F83 ', 'F88 ', 'F89 ' | select State, RegId, OrgId, ClusId, SUId, PersId, RecordId, DxAdd06, Age from EPI join EpiAge using (State, RegId, OrgId, ClusId, SUId, PersId, RecordId) where DxAdd06 in ('F80.0 ', 'F80.1 ', 'F80.2 ', 'F80.3 ', 'F80.8 ', 'F80.9 ', 'F81.0 ', 'F81.1 ', 'F81.2 ', 'F81.3 ', 'F81.8 ', 'F81.9 ', 'F82 ', 'F83 ', 'F88 ', 'F89 ') and Age < 1 |
BadDxAdd07F | Inconsistent | High | No | Diagnosis ($DxAdd07) and Sex ($Sex) is not female | EPI.DxAdd07 | The following diagnosis codes should only apply to females: 'F53.0 ', 'F53.1 ', 'F53.8 ', 'F53.9 ', 'F32.01', 'F32.11', 'F32.21', 'F32.31', 'F32.81', 'F32.91', 'O99.3 ', 'F52.5 ' | select State, RegId, OrgId, ClusId, SUId, PersId, RecordId, DxAdd07, Sex from EPI join PER using (State, RegId, OrgId, ClusId, SUId, PersId) where DxAdd07 in ('F53.0 ', 'F53.1 ', 'F53.8 ', 'F53.9 ', 'F32.01', 'F32.11', 'F32.21', 'F32.31', 'F32.81', 'F32.91', 'O99.3 ', 'F52.5 ') and Sex != '2' |
BadDxAdd07M | Inconsistent | High | No | Diagnosis ($DxAdd07) and Sex ($Sex) is not male | EPI.DxAdd07 | The following diagnosis codes should only apply to males: 'F52.4 ' | select State, RegId, OrgId, ClusId, SUId, PersId, RecordId, DxAdd07, Sex from EPI join PER using (State, RegId, OrgId, ClusId, SUId, PersId) where DxAdd07 in ('F52.4 ') and Sex != '1' |
BadDxAdd07Ppm | Inconsistent | Low | No | Diagnosis ($DxAdd07) and Age ($Age) not between 10 and 60 | EPI.DxAdd07 | The following diagnosis codes should only apply to ages 10-60: 'F53 ', 'F53.0 ', 'F53.1 ', 'F53.8 ', 'F53.9 ', 'F32.01', 'F32.11', 'F32.21', 'F32.31', 'F32.81', 'F32.91', 'O99.3 ' | select State, RegId, OrgId, ClusId, SUId, PersId, RecordId, DxAdd07, Age from EPI join EpiAge using (State, RegId, OrgId, ClusId, SUId, PersId, RecordId) where DxAdd07 in ('F53 ', 'F53.0 ', 'F53.1 ', 'F53.8 ', 'F53.9 ', 'F32.01', 'F32.11', 'F32.21', 'F32.31', 'F32.81', 'F32.91', 'O99.3 ') and Age not between 10 and 60 |
BadDxAdd07Ad | Inconsistent | Low | No | Diagnosis ($DxAdd07) and Age ($Age) less than 15 | EPI.DxAdd07 | The following diagnosis codes should not apply to ages less than 15: 'F03 ', 'F01.0 ', 'F01.1 ', 'F01.2 ', 'F01.3 ', 'F01.8 ', 'F01.9 ' | select State, RegId, OrgId, ClusId, SUId, PersId, RecordId, DxAdd07, Age from EPI join EpiAge using (State, RegId, OrgId, ClusId, SUId, PersId, RecordId) where DxAdd07 in ('F03 ', 'F01.0 ', 'F01.1 ', 'F01.2 ', 'F01.3 ', 'F01.8 ', 'F01.9 ') and Age < 15 |
BadDxAdd07LowAge | Inconsistent | Low | No | Diagnosis ($DxAdd07) and Age ($Age) less than 1 | EPI.DxAdd07 | The following diagnosis codes should not apply to ages less than 1: 'F80.0 ', 'F80.1 ', 'F80.2 ', 'F80.3 ', 'F80.8 ', 'F80.9 ', 'F81.0 ', 'F81.1 ', 'F81.2 ', 'F81.3 ', 'F81.8 ', 'F81.9 ', 'F82 ', 'F83 ', 'F88 ', 'F89 ' | select State, RegId, OrgId, ClusId, SUId, PersId, RecordId, DxAdd07, Age from EPI join EpiAge using (State, RegId, OrgId, ClusId, SUId, PersId, RecordId) where DxAdd07 in ('F80.0 ', 'F80.1 ', 'F80.2 ', 'F80.3 ', 'F80.8 ', 'F80.9 ', 'F81.0 ', 'F81.1 ', 'F81.2 ', 'F81.3 ', 'F81.8 ', 'F81.9 ', 'F82 ', 'F83 ', 'F88 ', 'F89 ') and Age < 1 |
BadDxAdd08F | Inconsistent | High | No | Diagnosis ($DxAdd08) and Sex ($Sex) is not female | EPI.DxAdd08 | The following diagnosis codes should only apply to females: 'F53.0 ', 'F53.1 ', 'F53.8 ', 'F53.9 ', 'F32.01', 'F32.11', 'F32.21', 'F32.31', 'F32.81', 'F32.91', 'O99.3 ', 'F52.5 ' | select State, RegId, OrgId, ClusId, SUId, PersId, RecordId, DxAdd08, Sex from EPI join PER using (State, RegId, OrgId, ClusId, SUId, PersId) where DxAdd08 in ('F53.0 ', 'F53.1 ', 'F53.8 ', 'F53.9 ', 'F32.01', 'F32.11', 'F32.21', 'F32.31', 'F32.81', 'F32.91', 'O99.3 ', 'F52.5 ') and Sex != '2' |
BadDxAdd08M | Inconsistent | High | No | Diagnosis ($DxAdd08) and Sex ($Sex) is not male | EPI.DxAdd08 | The following diagnosis codes should only apply to males: 'F52.4 ' | select State, RegId, OrgId, ClusId, SUId, PersId, RecordId, DxAdd08, Sex from EPI join PER using (State, RegId, OrgId, ClusId, SUId, PersId) where DxAdd08 in ('F52.4 ') and Sex != '1' |
BadDxAdd08Ppm | Inconsistent | Low | No | Diagnosis ($DxAdd08) and Age ($Age) not between 10 and 60 | EPI.DxAdd08 | The following diagnosis codes should only apply to ages 10-60: 'F53 ', 'F53.0 ', 'F53.1 ', 'F53.8 ', 'F53.9 ', 'F32.01', 'F32.11', 'F32.21', 'F32.31', 'F32.81', 'F32.91', 'O99.3 ' | select State, RegId, OrgId, ClusId, SUId, PersId, RecordId, DxAdd08, Age from EPI join EpiAge using (State, RegId, OrgId, ClusId, SUId, PersId, RecordId) where DxAdd08 in ('F53 ', 'F53.0 ', 'F53.1 ', 'F53.8 ', 'F53.9 ', 'F32.01', 'F32.11', 'F32.21', 'F32.31', 'F32.81', 'F32.91', 'O99.3 ') and Age not between 10 and 60 |
BadDxAdd08Ad | Inconsistent | Low | No | Diagnosis ($DxAdd08) and Age ($Age) less than 15 | EPI.DxAdd08 | The following diagnosis codes should not apply to ages less than 15: 'F03 ', 'F01.0 ', 'F01.1 ', 'F01.2 ', 'F01.3 ', 'F01.8 ', 'F01.9 ' | select State, RegId, OrgId, ClusId, SUId, PersId, RecordId, DxAdd08, Age from EPI join EpiAge using (State, RegId, OrgId, ClusId, SUId, PersId, RecordId) where DxAdd08 in ('F03 ', 'F01.0 ', 'F01.1 ', 'F01.2 ', 'F01.3 ', 'F01.8 ', 'F01.9 ') and Age < 15 |
BadDxAdd08LowAge | Inconsistent | Low | No | Diagnosis ($DxAdd08) and Age ($Age) less than 1 | EPI.DxAdd08 | The following diagnosis codes should not apply to ages less than 1: 'F80.0 ', 'F80.1 ', 'F80.2 ', 'F80.3 ', 'F80.8 ', 'F80.9 ', 'F81.0 ', 'F81.1 ', 'F81.2 ', 'F81.3 ', 'F81.8 ', 'F81.9 ', 'F82 ', 'F83 ', 'F88 ', 'F89 ' | select State, RegId, OrgId, ClusId, SUId, PersId, RecordId, DxAdd08, Age from EPI join EpiAge using (State, RegId, OrgId, ClusId, SUId, PersId, RecordId) where DxAdd08 in ('F80.0 ', 'F80.1 ', 'F80.2 ', 'F80.3 ', 'F80.8 ', 'F80.9 ', 'F81.0 ', 'F81.1 ', 'F81.2 ', 'F81.3 ', 'F81.8 ', 'F81.9 ', 'F82 ', 'F83 ', 'F88 ', 'F89 ') and Age < 1 |
BadDxAdd09F | Inconsistent | High | No | Diagnosis ($DxAdd09) and Sex ($Sex) is not female | EPI.DxAdd09 | The following diagnosis codes should only apply to females: 'F53.0 ', 'F53.1 ', 'F53.8 ', 'F53.9 ', 'F32.01', 'F32.11', 'F32.21', 'F32.31', 'F32.81', 'F32.91', 'O99.3 ', 'F52.5 ' | select State, RegId, OrgId, ClusId, SUId, PersId, RecordId, DxAdd09, Sex from EPI join PER using (State, RegId, OrgId, ClusId, SUId, PersId) where DxAdd09 in ('F53.0 ', 'F53.1 ', 'F53.8 ', 'F53.9 ', 'F32.01', 'F32.11', 'F32.21', 'F32.31', 'F32.81', 'F32.91', 'O99.3 ', 'F52.5 ') and Sex != '2' |
BadDxAdd09M | Inconsistent | High | No | Diagnosis ($DxAdd09) and Sex ($Sex) is not male | EPI.DxAdd09 | The following diagnosis codes should only apply to males: 'F52.4 ' | select State, RegId, OrgId, ClusId, SUId, PersId, RecordId, DxAdd09, Sex from EPI join PER using (State, RegId, OrgId, ClusId, SUId, PersId) where DxAdd09 in ('F52.4 ') and Sex != '1' |
BadDxAdd09Ppm | Inconsistent | Low | No | Diagnosis ($DxAdd09) and Age ($Age) not between 10 and 60 | EPI.DxAdd09 | The following diagnosis codes should only apply to ages 10-60: 'F53 ', 'F53.0 ', 'F53.1 ', 'F53.8 ', 'F53.9 ', 'F32.01', 'F32.11', 'F32.21', 'F32.31', 'F32.81', 'F32.91', 'O99.3 ' | select State, RegId, OrgId, ClusId, SUId, PersId, RecordId, DxAdd09, Age from EPI join EpiAge using (State, RegId, OrgId, ClusId, SUId, PersId, RecordId) where DxAdd09 in ('F53 ', 'F53.0 ', 'F53.1 ', 'F53.8 ', 'F53.9 ', 'F32.01', 'F32.11', 'F32.21', 'F32.31', 'F32.81', 'F32.91', 'O99.3 ') and Age not between 10 and 60 |
BadDxAdd09Ad | Inconsistent | Low | No | Diagnosis ($DxAdd09) and Age ($Age) less than 15 | EPI.DxAdd09 | The following diagnosis codes should not apply to ages less than 15: 'F03 ', 'F01.0 ', 'F01.1 ', 'F01.2 ', 'F01.3 ', 'F01.8 ', 'F01.9 ' | select State, RegId, OrgId, ClusId, SUId, PersId, RecordId, DxAdd09, Age from EPI join EpiAge using (State, RegId, OrgId, ClusId, SUId, PersId, RecordId) where DxAdd09 in ('F03 ', 'F01.0 ', 'F01.1 ', 'F01.2 ', 'F01.3 ', 'F01.8 ', 'F01.9 ') and Age < 15 |
BadDxAdd09LowAge | Inconsistent | Low | No | Diagnosis ($DxAdd09) and Age ($Age) less than 1 | EPI.DxAdd09 | The following diagnosis codes should not apply to ages less than 1: 'F80.0 ', 'F80.1 ', 'F80.2 ', 'F80.3 ', 'F80.8 ', 'F80.9 ', 'F81.0 ', 'F81.1 ', 'F81.2 ', 'F81.3 ', 'F81.8 ', 'F81.9 ', 'F82 ', 'F83 ', 'F88 ', 'F89 ' | select State, RegId, OrgId, ClusId, SUId, PersId, RecordId, DxAdd09, Age from EPI join EpiAge using (State, RegId, OrgId, ClusId, SUId, PersId, RecordId) where DxAdd09 in ('F80.0 ', 'F80.1 ', 'F80.2 ', 'F80.3 ', 'F80.8 ', 'F80.9 ', 'F81.0 ', 'F81.1 ', 'F81.2 ', 'F81.3 ', 'F81.8 ', 'F81.9 ', 'F82 ', 'F83 ', 'F88 ', 'F89 ') and Age < 1 |
BadDxAdd10F | Inconsistent | High | No | Diagnosis ($DxAdd10) and Sex ($Sex) is not female | EPI.DxAdd10 | The following diagnosis codes should only apply to females: 'F53.0 ', 'F53.1 ', 'F53.8 ', 'F53.9 ', 'F32.01', 'F32.11', 'F32.21', 'F32.31', 'F32.81', 'F32.91', 'O99.3 ', 'F52.5 ' | select State, RegId, OrgId, ClusId, SUId, PersId, RecordId, DxAdd10, Sex from EPI join PER using (State, RegId, OrgId, ClusId, SUId, PersId) where DxAdd10 in ('F53.0 ', 'F53.1 ', 'F53.8 ', 'F53.9 ', 'F32.01', 'F32.11', 'F32.21', 'F32.31', 'F32.81', 'F32.91', 'O99.3 ', 'F52.5 ') and Sex != '2' |
BadDxAdd10M | Inconsistent | High | No | Diagnosis ($DxAdd10) and Sex ($Sex) is not male | EPI.DxAdd10 | The following diagnosis codes should only apply to males: 'F52.4 ' | select State, RegId, OrgId, ClusId, SUId, PersId, RecordId, DxAdd10, Sex from EPI join PER using (State, RegId, OrgId, ClusId, SUId, PersId) where DxAdd10 in ('F52.4 ') and Sex != '1' |
BadDxAdd10Ppm | Inconsistent | Low | No | Diagnosis ($DxAdd10) and Age ($Age) not between 10 and 60 | EPI.DxAdd10 | The following diagnosis codes should only apply to ages 10-60: 'F53 ', 'F53.0 ', 'F53.1 ', 'F53.8 ', 'F53.9 ', 'F32.01', 'F32.11', 'F32.21', 'F32.31', 'F32.81', 'F32.91', 'O99.3 ' | select State, RegId, OrgId, ClusId, SUId, PersId, RecordId, DxAdd10, Age from EPI join EpiAge using (State, RegId, OrgId, ClusId, SUId, PersId, RecordId) where DxAdd10 in ('F53 ', 'F53.0 ', 'F53.1 ', 'F53.8 ', 'F53.9 ', 'F32.01', 'F32.11', 'F32.21', 'F32.31', 'F32.81', 'F32.91', 'O99.3 ') and Age not between 10 and 60 |
BadDxAdd10Ad | Inconsistent | Low | No | Diagnosis ($DxAdd10) and Age ($Age) less than 15 | EPI.DxAdd10 | The following diagnosis codes should not apply to ages less than 15: 'F03 ', 'F01.0 ', 'F01.1 ', 'F01.2 ', 'F01.3 ', 'F01.8 ', 'F01.9 ' | select State, RegId, OrgId, ClusId, SUId, PersId, RecordId, DxAdd10, Age from EPI join EpiAge using (State, RegId, OrgId, ClusId, SUId, PersId, RecordId) where DxAdd10 in ('F03 ', 'F01.0 ', 'F01.1 ', 'F01.2 ', 'F01.3 ', 'F01.8 ', 'F01.9 ') and Age < 15 |
BadDxAdd10LowAge | Inconsistent | Low | No | Diagnosis ($DxAdd10) and Age ($Age) less than 1 | EPI.DxAdd10 | The following diagnosis codes should not apply to ages less than 1: 'F80.0 ', 'F80.1 ', 'F80.2 ', 'F80.3 ', 'F80.8 ', 'F80.9 ', 'F81.0 ', 'F81.1 ', 'F81.2 ', 'F81.3 ', 'F81.8 ', 'F81.9 ', 'F82 ', 'F83 ', 'F88 ', 'F89 ' | select State, RegId, OrgId, ClusId, SUId, PersId, RecordId, DxAdd10, Age from EPI join EpiAge using (State, RegId, OrgId, ClusId, SUId, PersId, RecordId) where DxAdd10 in ('F80.0 ', 'F80.1 ', 'F80.2 ', 'F80.3 ', 'F80.8 ', 'F80.9 ', 'F81.0 ', 'F81.1 ', 'F81.2 ', 'F81.3 ', 'F81.8 ', 'F81.9 ', 'F82 ', 'F83 ', 'F88 ', 'F89 ') and Age < 1 |
HighExtSA2Prop | Anomaly | Low | No | Greater than 5% ($prop.perc) of Episodes have a ResArea out of state | HR.State | Greater than 5% of Episodes a ResArea out of state. (This check does not apply to ACT) | select State, prop from HrResAreaProp where State != '8' and prop > 0.05 |
HighEstDoBFlagProp | Anomaly | Low | No | Greater than 5% ($prop.perc) of Persons have an Estimated Date of Birth | HR.State | Greater than 5% of Persons have an Estimated Date of Birth | select State, prop from HrDoBFlagProp where prop > 0.05 |
HighExtCoBProp | Anomaly | High | No | Greater than 50% ($prop.perc) of Persons have a CoB other than Australia | HR.State | Greater than 50% of Persons have a CoB other than Australia | select State, prop from HrCoBPropNotAus where prop > 0.5 |
HighSuppCoBProp | Anomaly | Low | No | Greater than 10% ($prop.perc) of Persons have a CoB with Supplementary code | HR.State | Greater than 10% of Persons have a CoB with Supplementary code | select State, prop from HrCoBPropSupp where prop > 0.10 |
SussHrDoBCount | Anomaly | Low | No | More than double the average birthrate ($DoBCount vs $PerDoBCountAvg) on a suspicious date ($DoB) | HR.State | There are greater than double the average number of births for a date which is likely to be a default or erroneous, selected from 9/9/9, 9/9/99, 1/1/1970, 1/1/11 | select State, DoB, count(*) AS DoBCount, round(PerDoBCountAvg,1) as PerDoBCountAvg from PER, PerDoBCount where DoB in ( '1970-01-01', '1911-01-01', '2011-01-01', '1909-09-09', '1999-09-09' ) and DoBFlag = '1' group by State, DoB, PerDoBCountAvg having count(*) > PerDoBCountAvg * 2 |
HighIndigNonAustProp | Anomaly | High | No | Proportion of IndigSt not born in Australia is greater than 5% ($prop.perc) | HR.State | Proportion of Indigenous Australians not born in Australia is greater than 5% | select State, prop from HrIndigStPropNonAus where prop > 0.05 |
HighRefProp9Mode4 | Anomaly | High | No | Proportion of EpiEndMode=4 with ReferralMHRC=9 is over than 50% ($prop.perc) | SERV | Proportion of Episodes with EpiEndMode 4 (Formal discharge from residential care at this establishm...) having ReferralMHRC 9 (Unknown/not stated/inadequately described) at Service unit level is greater than 50% | select State, RegId, OrgId, ClusId, SUId, prop from ServRefProp9Mode4 where prop > 0.5 |
PerSexDiffers | Inconsistent | High | No | Person has $attr_count values for Sex ($attr_vals) | PER.Sex | Person has multiple values for Sex (Sex) across one organisation | select State, RegId, OrgId, ClusId, SUId, PersId, attr_count, attr_vals from PER join ( select State, RegId, OrgId, PersId, count(DISTINCT Sex) as attr_count, string_agg(DISTINCT Sex::TEXT, ',') as attr_vals from PER group by State, RegId, OrgId, PersId having count(DISTINCT Sex) > 1 ) counts using (State, RegId, OrgId, PersId) |
PerDoBDiffers | Inconsistent | High | No | Person has $attr_count values for DoB ($attr_vals) | PER.DoB | Person has multiple values for DoB (Date of Birth) across one organisation | select State, RegId, OrgId, ClusId, SUId, PersId, attr_count, attr_vals from PER join ( select State, RegId, OrgId, PersId, count(DISTINCT DoB) as attr_count, string_agg(DISTINCT DoB::TEXT, ',') as attr_vals from PER group by State, RegId, OrgId, PersId having count(DISTINCT DoB) > 1 ) counts using (State, RegId, OrgId, PersId) |
PerDoBFlagDiffers | Inconsistent | High | No | Person has $attr_count values for DoBFlag ($attr_vals) | PER.DoBFlag | Person has multiple values for DoBFlag (Estimated Date of Birth Flag) across one organisation | select State, RegId, OrgId, ClusId, SUId, PersId, attr_count, attr_vals from PER join ( select State, RegId, OrgId, PersId, count(DISTINCT DoBFlag) as attr_count, string_agg(DISTINCT DoBFlag::TEXT, ',') as attr_vals from PER group by State, RegId, OrgId, PersId having count(DISTINCT DoBFlag) > 1 ) counts using (State, RegId, OrgId, PersId) |
PerCoBDiffers | Inconsistent | High | No | Person has $attr_count values for CoB ($attr_vals) | PER.CoB | Person has multiple values for CoB (Country of Birth) across one organisation | select State, RegId, OrgId, ClusId, SUId, PersId, attr_count, attr_vals from PER join ( select State, RegId, OrgId, PersId, count(DISTINCT CoB) as attr_count, string_agg(DISTINCT CoB::TEXT, ',') as attr_vals from PER group by State, RegId, OrgId, PersId having count(DISTINCT CoB) > 1 ) counts using (State, RegId, OrgId, PersId) |
PerIndigStDiffers | Inconsistent | High | No | Person has $attr_count values for IndigSt ($attr_vals) | PER.IndigSt | Person has multiple values for IndigSt (Indigenous Status) across one organisation | select State, RegId, OrgId, ClusId, SUId, PersId, attr_count, attr_vals from PER join ( select State, RegId, OrgId, PersId, count(DISTINCT IndigSt) as attr_count, string_agg(DISTINCT IndigSt::TEXT, ',') as attr_vals from PER group by State, RegId, OrgId, PersId having count(DISTINCT IndigSt) > 1 ) counts using (State, RegId, OrgId, PersId) |
BadHrLegalSt12Counts | Anomaly | High | No | LegalSt '1' count ($LowCount) exceeds '2' count ($HighCount) | HR | Mental Health Legal Status (LegalSt) '1' (Involuntary patient) count exceeds '2' (Voluntary patient) count | select State, sum( (LegalSt = '1')::INT ) LowCount, sum( (LegalSt = '2')::INT ) HighCount from EPI group by State having sum( (LegalSt = '1')::INT ) > sum( (LegalSt = '2')::INT ) |
OrgInvolPropVaries | Historical | Medium | No | OrgLegalSt1Prop variation of $PercChange percent. | ORG | Variation over 10 percentage points in organisation-wide ratio of Involuntary legal status. | select State, RegId, OrgId, round(100::float * abs(New.prop - Old.prop)) as PercChange from OrgLegalSt1Prop as New join hist.OrgLegalSt1Prop as Old using(State, RegId, OrgId) where abs(New.prop - Old.prop) > 0.10; |
ResiStayLessThanZero | Anomaly | Low | No | Residential stay is less than zero ($days days). | EPI | Residential stay is less than zero. | select State, RegId, OrgId, ClusId, SUId, PersId, RecordId, days from ResiStayDays where days < 0; |
EpiStartModeMismatch | Anomaly | High | Yes | EpiEndMode 6 but EpiStartMode is not 4 ($EpiStartMode). | EPI.EpiStartMode | EpiEndMode 6 but EpiStartMode is not 4. | select State, RegId, OrgId, ClusId, SUId, PersId, RecordId, EpiStartMode from EPI where EpiEndMode='6' and EpiStartMode != '4'; |
PropResAreaUnknown | Anomaly | Low | Yes | Greater than 10% of episodes within a service unit have a ResArea that is coded as unknown or no usual address ($unknowns of $total). | SERV | Greater than 10% of episodes within a service unit have a ResArea that is coded as unknown or no usual address. | with epi_counts as( select State, RegId, OrgId, ClusId, SUId, count(*) as total, sum( CASE WHEN ResArea ~ '^.99999(497|498|499|999)$' THEN 1 ELSE 0 END ) as unknowns from EPI group by State, RegId, OrgId, ClusId, SUId ) select State, RegId, OrgId, ClusId, SUId, unknowns, total from epi_counts where unknowns > 0 and total > 0 and sd_div(unknowns, total, 3) > 0.10; |
ServOpened | Historical | High | No | Serv opened, $SUName.qt (SUId: $SUId) not in historical data | SERV | Service Unit Opened - A matching Service Unit was not found in the historical data | select State, RegId, OrgId, ClusId, SUId, SERV.SUName from main.SERV left join hist.SERV as hist_entity using (State, RegId, OrgId, ClusId, SUId) where hist_entity.SUId is null |
ServClosed | Historical | High | No | Serv closed, historical $hist_name.qt (SUId: $hist_SUId) no longer exists | HR.State | Service Unit Closed - A historical Service Unit was not found in current data | select State, hist_entity.State as hist_State, hist_entity.RegId as hist_RegId, hist_entity.OrgId as hist_OrgId, hist_entity.ClusId as hist_ClusId, hist_entity.SUId as hist_SUId, hist_entity.SUName as hist_name from hist.SERV as hist_entity left join main.SERV using (State, RegId, OrgId, ClusId, SUId) where SERV.SUId is null |
ServRenamed | Historical | High | No | Serv renamed from $hist_name.qt to $SUName.qt | SERV.SUName | Service Unit Renamed - Service Unit Name differs between historical and current data | select State, RegId, OrgId, ClusId, SUId, SERV.SUName, hist_entity.SUName as hist_name from SERV join hist.SERV as hist_entity using(State, RegId, OrgId, ClusId, SUId) where not sloppy_match(SERV.SUName, hist_entity.SUName) |
RegNotInSkl | Skeleton | High | No | Reg $name not in SKL data | Region not in skeleton reference data - A matching Residential Region (REG) was not found in the skeleton data | ||
RegInSklOnly | Skeleton | High | No | Reg $name expected from SKL is missing | Region (REG) appears in skeleton data only - A Region (REG) with matching Ids is expected based on the SKL data but is not present in this file | ||
OrgNotInSkl | Skeleton | High | No | Org $name not in SKL data | Organisation not in skeleton reference data - A matching Residential Organisation (ORG) was not found in the skeleton data | ||
OrgInSklOnly | Skeleton | High | No | Org $name expected from SKL is missing | Organisation (ORG) appears in skeleton data only - A Organisation (ORG) with matching Ids is expected based on the SKL data but is not present in this file | ||
ClusNotInSkl | Skeleton | High | No | Clus $name not in SKL data | Service Unit Cluster not in skeleton reference data - A matching Residential Service Unit Cluster (CLUS) was not found in the skeleton data | ||
ClusInSklOnly | Skeleton | High | No | Clus $name expected from SKL is missing | Service Unit Cluster (CLUS) appears in skeleton data only - A Service Unit Cluster (CLUS) with matching Ids is expected based on the SKL data but is not present in this file | ||
ServNotInSkl | Skeleton | High | No | Serv $name not in SKL data | Service Unit not in skeleton reference data - A matching Residential Service Unit (RESI) was not found in the skeleton data | ||
ServInSklOnly | Skeleton | High | No | Serv $name expected from SKL is missing | Service Unit (RESI) appears in skeleton data only - A Service Unit (SERV) with matching Ids is expected based on the SKL data but is not present in this file |