Main Content

RMHC version 04.50: Rules

Table detailing the rules for specification: RMHC
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 - 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 - Service Unit 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
EpiPersSLAMissing Missing High No Missing data - PersSLA $PersSLA.q EPI.PersSLA Missing data - Area of Usual Residence (PersSLA) select State, RegId, OrgId, ClusId, SUId, PersId, RecordId, PersSLA from EPI where PersSLA is null
EpiReferralMHRCMissing Missing High No Missing data - ReferralMHRC $ReferralMHRC.q EPI.ReferralMHRC Missing data - Referral From Specialised Mental Health Residential Care (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 110 years ($Age) EPI Age is greater than 110 years select State, RegId, OrgId, ClusId, SUId, PersId, RecordId, Age from EpiAge where Age > 110
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'
BadSLAProp Anomaly Low No Greater than 5% ($prop.perc) of SLAs are invalid ($BadCount in total) HR.State Greater than 5% of SLAs (PersSLA) 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 = 'PersSLA' ) 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))
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
BadDxPrincF Inconsistent High No Diagnosis ($DxPrinc) and Sex ($Sex) is not female EPI.DxPrinc The following diagnosis codes should only apply to females: 'F53 ', '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 ', '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 15 and 55 EPI.DxPrinc The following diagnosis codes should only apply to ages 15-55: 'F53 ', 'F53.0 ', 'F53.1 ', 'F53.8 ', 'F53.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 ('F53 ', 'F53.0 ', 'F53.1 ', 'F53.8 ', 'F53.9 ') and Age not between 15 and 55
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: 'F00.0 ', 'F00.1 ', 'F00.2 ', 'F00.9 ', 'F03 ', 'F52 ', 'F52.0 ', 'F52.1 ', 'F52.2 ', 'F52.3 ', 'F52.4 ', 'F52.5 ', 'F52.6 ', 'F52.7 ', 'F52.8 ', 'F52.9 ', 'F64.0 ', 'F64.1 ' 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 ('F00.0 ', 'F00.1 ', 'F00.2 ', 'F00.9 ', 'F03 ', 'F52 ', 'F52.0 ', 'F52.1 ', 'F52.2 ', 'F52.3 ', 'F52.4 ', 'F52.5 ', 'F52.6 ', 'F52.7 ', 'F52.8 ', 'F52.9 ', 'F64.0 ', 'F64.1 ') and Age < 15
BadDxPrincCh Inconsistent Low No Diagnosis ($DxPrinc) and Age ($Age) greater than 16 EPI.DxPrinc The following diagnosis codes should not apply to ages greater than 16: 'F64.2 ' 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 ('F64.2 ') and Age > 16
BadDxAdd01F Inconsistent High No Diagnosis ($DxAdd01) and Sex ($Sex) is not female EPI.DxAdd01 The following diagnosis codes should only apply to females: 'F53 ', '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 ', '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 15 and 55 EPI.DxAdd01 The following diagnosis codes should only apply to ages 15-55: 'F53 ', 'F53.0 ', 'F53.1 ', 'F53.8 ', 'F53.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 ('F53 ', 'F53.0 ', 'F53.1 ', 'F53.8 ', 'F53.9 ') and Age not between 15 and 55
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: 'F00.0 ', 'F00.1 ', 'F00.2 ', 'F00.9 ', 'F03 ', 'F52 ', 'F52.0 ', 'F52.1 ', 'F52.2 ', 'F52.3 ', 'F52.4 ', 'F52.5 ', 'F52.6 ', 'F52.7 ', 'F52.8 ', 'F52.9 ', 'F64.0 ', 'F64.1 ' 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 ('F00.0 ', 'F00.1 ', 'F00.2 ', 'F00.9 ', 'F03 ', 'F52 ', 'F52.0 ', 'F52.1 ', 'F52.2 ', 'F52.3 ', 'F52.4 ', 'F52.5 ', 'F52.6 ', 'F52.7 ', 'F52.8 ', 'F52.9 ', 'F64.0 ', 'F64.1 ') and Age < 15
BadDxAdd01Ch Inconsistent Low No Diagnosis ($DxAdd01) and Age ($Age) greater than 16 EPI.DxAdd01 The following diagnosis codes should not apply to ages greater than 16: 'F64.2 ' 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 ('F64.2 ') and Age > 16
BadDxAdd02F Inconsistent High No Diagnosis ($DxAdd02) and Sex ($Sex) is not female EPI.DxAdd02 The following diagnosis codes should only apply to females: 'F53 ', '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 ', '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 15 and 55 EPI.DxAdd02 The following diagnosis codes should only apply to ages 15-55: 'F53 ', 'F53.0 ', 'F53.1 ', 'F53.8 ', 'F53.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 ('F53 ', 'F53.0 ', 'F53.1 ', 'F53.8 ', 'F53.9 ') and Age not between 15 and 55
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: 'F00.0 ', 'F00.1 ', 'F00.2 ', 'F00.9 ', 'F03 ', 'F52 ', 'F52.0 ', 'F52.1 ', 'F52.2 ', 'F52.3 ', 'F52.4 ', 'F52.5 ', 'F52.6 ', 'F52.7 ', 'F52.8 ', 'F52.9 ', 'F64.0 ', 'F64.1 ' 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 ('F00.0 ', 'F00.1 ', 'F00.2 ', 'F00.9 ', 'F03 ', 'F52 ', 'F52.0 ', 'F52.1 ', 'F52.2 ', 'F52.3 ', 'F52.4 ', 'F52.5 ', 'F52.6 ', 'F52.7 ', 'F52.8 ', 'F52.9 ', 'F64.0 ', 'F64.1 ') and Age < 15
BadDxAdd02Ch Inconsistent Low No Diagnosis ($DxAdd02) and Age ($Age) greater than 16 EPI.DxAdd02 The following diagnosis codes should not apply to ages greater than 16: 'F64.2 ' 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 ('F64.2 ') and Age > 16
BadDxAdd03F Inconsistent High No Diagnosis ($DxAdd03) and Sex ($Sex) is not female EPI.DxAdd03 The following diagnosis codes should only apply to females: 'F53 ', '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 ', '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 15 and 55 EPI.DxAdd03 The following diagnosis codes should only apply to ages 15-55: 'F53 ', 'F53.0 ', 'F53.1 ', 'F53.8 ', 'F53.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 ('F53 ', 'F53.0 ', 'F53.1 ', 'F53.8 ', 'F53.9 ') and Age not between 15 and 55
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: 'F00.0 ', 'F00.1 ', 'F00.2 ', 'F00.9 ', 'F03 ', 'F52 ', 'F52.0 ', 'F52.1 ', 'F52.2 ', 'F52.3 ', 'F52.4 ', 'F52.5 ', 'F52.6 ', 'F52.7 ', 'F52.8 ', 'F52.9 ', 'F64.0 ', 'F64.1 ' 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 ('F00.0 ', 'F00.1 ', 'F00.2 ', 'F00.9 ', 'F03 ', 'F52 ', 'F52.0 ', 'F52.1 ', 'F52.2 ', 'F52.3 ', 'F52.4 ', 'F52.5 ', 'F52.6 ', 'F52.7 ', 'F52.8 ', 'F52.9 ', 'F64.0 ', 'F64.1 ') and Age < 15
BadDxAdd03Ch Inconsistent Low No Diagnosis ($DxAdd03) and Age ($Age) greater than 16 EPI.DxAdd03 The following diagnosis codes should not apply to ages greater than 16: 'F64.2 ' 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 ('F64.2 ') and Age > 16
BadDxAdd04F Inconsistent High No Diagnosis ($DxAdd04) and Sex ($Sex) is not female EPI.DxAdd04 The following diagnosis codes should only apply to females: 'F53 ', '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 ', '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 15 and 55 EPI.DxAdd04 The following diagnosis codes should only apply to ages 15-55: 'F53 ', 'F53.0 ', 'F53.1 ', 'F53.8 ', 'F53.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 ('F53 ', 'F53.0 ', 'F53.1 ', 'F53.8 ', 'F53.9 ') and Age not between 15 and 55
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: 'F00.0 ', 'F00.1 ', 'F00.2 ', 'F00.9 ', 'F03 ', 'F52 ', 'F52.0 ', 'F52.1 ', 'F52.2 ', 'F52.3 ', 'F52.4 ', 'F52.5 ', 'F52.6 ', 'F52.7 ', 'F52.8 ', 'F52.9 ', 'F64.0 ', 'F64.1 ' 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 ('F00.0 ', 'F00.1 ', 'F00.2 ', 'F00.9 ', 'F03 ', 'F52 ', 'F52.0 ', 'F52.1 ', 'F52.2 ', 'F52.3 ', 'F52.4 ', 'F52.5 ', 'F52.6 ', 'F52.7 ', 'F52.8 ', 'F52.9 ', 'F64.0 ', 'F64.1 ') and Age < 15
BadDxAdd04Ch Inconsistent Low No Diagnosis ($DxAdd04) and Age ($Age) greater than 16 EPI.DxAdd04 The following diagnosis codes should not apply to ages greater than 16: 'F64.2 ' 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 ('F64.2 ') and Age > 16
BadDxAdd05F Inconsistent High No Diagnosis ($DxAdd05) and Sex ($Sex) is not female EPI.DxAdd05 The following diagnosis codes should only apply to females: 'F53 ', '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 ', '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 15 and 55 EPI.DxAdd05 The following diagnosis codes should only apply to ages 15-55: 'F53 ', 'F53.0 ', 'F53.1 ', 'F53.8 ', 'F53.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 ('F53 ', 'F53.0 ', 'F53.1 ', 'F53.8 ', 'F53.9 ') and Age not between 15 and 55
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: 'F00.0 ', 'F00.1 ', 'F00.2 ', 'F00.9 ', 'F03 ', 'F52 ', 'F52.0 ', 'F52.1 ', 'F52.2 ', 'F52.3 ', 'F52.4 ', 'F52.5 ', 'F52.6 ', 'F52.7 ', 'F52.8 ', 'F52.9 ', 'F64.0 ', 'F64.1 ' 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 ('F00.0 ', 'F00.1 ', 'F00.2 ', 'F00.9 ', 'F03 ', 'F52 ', 'F52.0 ', 'F52.1 ', 'F52.2 ', 'F52.3 ', 'F52.4 ', 'F52.5 ', 'F52.6 ', 'F52.7 ', 'F52.8 ', 'F52.9 ', 'F64.0 ', 'F64.1 ') and Age < 15
BadDxAdd05Ch Inconsistent Low No Diagnosis ($DxAdd05) and Age ($Age) greater than 16 EPI.DxAdd05 The following diagnosis codes should not apply to ages greater than 16: 'F64.2 ' 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 ('F64.2 ') and Age > 16
BadDxAdd06F Inconsistent High No Diagnosis ($DxAdd06) and Sex ($Sex) is not female EPI.DxAdd06 The following diagnosis codes should only apply to females: 'F53 ', '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 ', '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 15 and 55 EPI.DxAdd06 The following diagnosis codes should only apply to ages 15-55: 'F53 ', 'F53.0 ', 'F53.1 ', 'F53.8 ', 'F53.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 ('F53 ', 'F53.0 ', 'F53.1 ', 'F53.8 ', 'F53.9 ') and Age not between 15 and 55
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: 'F00.0 ', 'F00.1 ', 'F00.2 ', 'F00.9 ', 'F03 ', 'F52 ', 'F52.0 ', 'F52.1 ', 'F52.2 ', 'F52.3 ', 'F52.4 ', 'F52.5 ', 'F52.6 ', 'F52.7 ', 'F52.8 ', 'F52.9 ', 'F64.0 ', 'F64.1 ' 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 ('F00.0 ', 'F00.1 ', 'F00.2 ', 'F00.9 ', 'F03 ', 'F52 ', 'F52.0 ', 'F52.1 ', 'F52.2 ', 'F52.3 ', 'F52.4 ', 'F52.5 ', 'F52.6 ', 'F52.7 ', 'F52.8 ', 'F52.9 ', 'F64.0 ', 'F64.1 ') and Age < 15
BadDxAdd06Ch Inconsistent Low No Diagnosis ($DxAdd06) and Age ($Age) greater than 16 EPI.DxAdd06 The following diagnosis codes should not apply to ages greater than 16: 'F64.2 ' 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 ('F64.2 ') and Age > 16
BadDxAdd07F Inconsistent High No Diagnosis ($DxAdd07) and Sex ($Sex) is not female EPI.DxAdd07 The following diagnosis codes should only apply to females: 'F53 ', '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 ', '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 15 and 55 EPI.DxAdd07 The following diagnosis codes should only apply to ages 15-55: 'F53 ', 'F53.0 ', 'F53.1 ', 'F53.8 ', 'F53.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 ('F53 ', 'F53.0 ', 'F53.1 ', 'F53.8 ', 'F53.9 ') and Age not between 15 and 55
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: 'F00.0 ', 'F00.1 ', 'F00.2 ', 'F00.9 ', 'F03 ', 'F52 ', 'F52.0 ', 'F52.1 ', 'F52.2 ', 'F52.3 ', 'F52.4 ', 'F52.5 ', 'F52.6 ', 'F52.7 ', 'F52.8 ', 'F52.9 ', 'F64.0 ', 'F64.1 ' 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 ('F00.0 ', 'F00.1 ', 'F00.2 ', 'F00.9 ', 'F03 ', 'F52 ', 'F52.0 ', 'F52.1 ', 'F52.2 ', 'F52.3 ', 'F52.4 ', 'F52.5 ', 'F52.6 ', 'F52.7 ', 'F52.8 ', 'F52.9 ', 'F64.0 ', 'F64.1 ') and Age < 15
BadDxAdd07Ch Inconsistent Low No Diagnosis ($DxAdd07) and Age ($Age) greater than 16 EPI.DxAdd07 The following diagnosis codes should not apply to ages greater than 16: 'F64.2 ' 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 ('F64.2 ') and Age > 16
BadDxAdd08F Inconsistent High No Diagnosis ($DxAdd08) and Sex ($Sex) is not female EPI.DxAdd08 The following diagnosis codes should only apply to females: 'F53 ', '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 ', '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 15 and 55 EPI.DxAdd08 The following diagnosis codes should only apply to ages 15-55: 'F53 ', 'F53.0 ', 'F53.1 ', 'F53.8 ', 'F53.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 ('F53 ', 'F53.0 ', 'F53.1 ', 'F53.8 ', 'F53.9 ') and Age not between 15 and 55
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: 'F00.0 ', 'F00.1 ', 'F00.2 ', 'F00.9 ', 'F03 ', 'F52 ', 'F52.0 ', 'F52.1 ', 'F52.2 ', 'F52.3 ', 'F52.4 ', 'F52.5 ', 'F52.6 ', 'F52.7 ', 'F52.8 ', 'F52.9 ', 'F64.0 ', 'F64.1 ' 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 ('F00.0 ', 'F00.1 ', 'F00.2 ', 'F00.9 ', 'F03 ', 'F52 ', 'F52.0 ', 'F52.1 ', 'F52.2 ', 'F52.3 ', 'F52.4 ', 'F52.5 ', 'F52.6 ', 'F52.7 ', 'F52.8 ', 'F52.9 ', 'F64.0 ', 'F64.1 ') and Age < 15
BadDxAdd08Ch Inconsistent Low No Diagnosis ($DxAdd08) and Age ($Age) greater than 16 EPI.DxAdd08 The following diagnosis codes should not apply to ages greater than 16: 'F64.2 ' 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 ('F64.2 ') and Age > 16
BadDxAdd09F Inconsistent High No Diagnosis ($DxAdd09) and Sex ($Sex) is not female EPI.DxAdd09 The following diagnosis codes should only apply to females: 'F53 ', '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 ', '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 15 and 55 EPI.DxAdd09 The following diagnosis codes should only apply to ages 15-55: 'F53 ', 'F53.0 ', 'F53.1 ', 'F53.8 ', 'F53.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 ('F53 ', 'F53.0 ', 'F53.1 ', 'F53.8 ', 'F53.9 ') and Age not between 15 and 55
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: 'F00.0 ', 'F00.1 ', 'F00.2 ', 'F00.9 ', 'F03 ', 'F52 ', 'F52.0 ', 'F52.1 ', 'F52.2 ', 'F52.3 ', 'F52.4 ', 'F52.5 ', 'F52.6 ', 'F52.7 ', 'F52.8 ', 'F52.9 ', 'F64.0 ', 'F64.1 ' 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 ('F00.0 ', 'F00.1 ', 'F00.2 ', 'F00.9 ', 'F03 ', 'F52 ', 'F52.0 ', 'F52.1 ', 'F52.2 ', 'F52.3 ', 'F52.4 ', 'F52.5 ', 'F52.6 ', 'F52.7 ', 'F52.8 ', 'F52.9 ', 'F64.0 ', 'F64.1 ') and Age < 15
BadDxAdd09Ch Inconsistent Low No Diagnosis ($DxAdd09) and Age ($Age) greater than 16 EPI.DxAdd09 The following diagnosis codes should not apply to ages greater than 16: 'F64.2 ' 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 ('F64.2 ') and Age > 16
BadDxAdd10F Inconsistent High No Diagnosis ($DxAdd10) and Sex ($Sex) is not female EPI.DxAdd10 The following diagnosis codes should only apply to females: 'F53 ', '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 ', '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 15 and 55 EPI.DxAdd10 The following diagnosis codes should only apply to ages 15-55: 'F53 ', 'F53.0 ', 'F53.1 ', 'F53.8 ', 'F53.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 ('F53 ', 'F53.0 ', 'F53.1 ', 'F53.8 ', 'F53.9 ') and Age not between 15 and 55
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: 'F00.0 ', 'F00.1 ', 'F00.2 ', 'F00.9 ', 'F03 ', 'F52 ', 'F52.0 ', 'F52.1 ', 'F52.2 ', 'F52.3 ', 'F52.4 ', 'F52.5 ', 'F52.6 ', 'F52.7 ', 'F52.8 ', 'F52.9 ', 'F64.0 ', 'F64.1 ' 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 ('F00.0 ', 'F00.1 ', 'F00.2 ', 'F00.9 ', 'F03 ', 'F52 ', 'F52.0 ', 'F52.1 ', 'F52.2 ', 'F52.3 ', 'F52.4 ', 'F52.5 ', 'F52.6 ', 'F52.7 ', 'F52.8 ', 'F52.9 ', 'F64.0 ', 'F64.1 ') and Age < 15
BadDxAdd10Ch Inconsistent Low No Diagnosis ($DxAdd10) and Age ($Age) greater than 16 EPI.DxAdd10 The following diagnosis codes should not apply to ages greater than 16: 'F64.2 ' 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 ('F64.2 ') and Age > 16
HighExtSLAProp Anomaly Low No Greater than 5% ($prop.perc) of Episodes have a PersSLA out of state HR.State Greater than 5% of Episodes a PersSLA out of state. (This check does not apply to ACT) select State, prop from HrPersSLAProp 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 (Other end of residential care at this establishment) 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 )
RegOpened Historical High No Reg opened, $RegName.qt (RegId: $RegId) not in historical data REG Region Opened - A matching Region was not found in the historical data select State, RegId, REG.RegName from main.REG left join hist.REG as hist_entity using (State, RegId) where hist_entity.RegId is null
RegClosed Historical High No Reg closed, historical $hist_name.qt (RegId: $hist_RegId) no longer exists HR.State Region Closed - A historical Region was not found in current data select State, hist_entity.State as hist_State, hist_entity.RegId as hist_RegId, hist_entity.RegName as hist_name from hist.REG as hist_entity left join main.REG using (State, RegId) where REG.RegId is null
RegRenamed Historical High No Reg renamed from $hist_name.qt to $RegName.qt REG.RegName Region Renamed - Region Name differs between historical and current data select State, RegId, REG.RegName, hist_entity.RegName as hist_name from REG join hist.REG as hist_entity using(State, RegId) where not sloppy_match(REG.RegName, hist_entity.RegName)
OrgOpened Historical High No Org opened, $OrgName.qt (OrgId: $OrgId) not in historical data ORG Organisation Opened - A matching Organisation was not found in the historical data select State, RegId, OrgId, ORG.OrgName from main.ORG left join hist.ORG as hist_entity using (State, RegId, OrgId) where hist_entity.OrgId is null
OrgClosed Historical High No Org closed, historical $hist_name.qt (OrgId: $hist_OrgId) no longer exists HR.State Organisation Closed - A historical Organisation 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.OrgName as hist_name from hist.ORG as hist_entity left join main.ORG using (State, RegId, OrgId) where ORG.OrgId is null
OrgRenamed Historical High No Org renamed from $hist_name.qt to $OrgName.qt ORG.OrgName Organisation Renamed - Organisation Name differs between historical and current data select State, RegId, OrgId, ORG.OrgName, hist_entity.OrgName as hist_name from ORG join hist.ORG as hist_entity using(State, RegId, OrgId) where not sloppy_match(ORG.OrgName, hist_entity.OrgName)
ClusOpened Historical High No Clus opened, $ClusName.qt (ClusId: $ClusId) not in historical data CLUS Service Unit Cluster Opened - A matching Service Unit Cluster was not found in the historical data select State, RegId, OrgId, ClusId, CLUS.ClusName from main.CLUS left join hist.CLUS as hist_entity using (State, RegId, OrgId, ClusId) where hist_entity.ClusId is null
ClusClosed Historical High No Clus closed, historical $hist_name.qt (ClusId: $hist_ClusId) no longer exists HR.State Service Unit Cluster Closed - A historical Service Unit Cluster 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.ClusName as hist_name from hist.CLUS as hist_entity left join main.CLUS using (State, RegId, OrgId, ClusId) where CLUS.ClusId is null
ClusRenamed Historical High No Clus renamed from $hist_name.qt to $ClusName.qt CLUS.ClusName Service Unit Cluster Renamed - Service Unit Cluster Name differs between historical and current data select State, RegId, OrgId, ClusId, CLUS.ClusName, hist_entity.ClusName as hist_name from CLUS join hist.CLUS as hist_entity using(State, RegId, OrgId, ClusId) where not sloppy_match(CLUS.ClusName, hist_entity.ClusName)
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