Healthcare Billing & Claims (837)
HIPAAfreeValidate medical claims data — CPT, HCPCS, revenue codes, diagnosis pointers, amounts, date sequences, and timely filing per X12 837 standards.
Checks included (19)
CPT Procedure Code Format(cpt_code)
Validates that values conform to the CPT (Current Procedural Terminology) code format. CPT codes are exactly 5 characters: Category I codes are 5 digits (00100-99499), Category II codes end with the letter F, and Category III codes end with T or U. Also accepts 4-digit codes followed by a single letter for tracking codes (e.g., 0001T).
HCPCS Level II Code Format(hcpcs_code)
Validates that values conform to the HCPCS (Healthcare Common Procedure Coding System) Level II format. HCPCS Level II codes consist of one letter (A-V) followed by exactly four digits (e.g., A0021, J0120, L0150). These codes identify products, supplies, and services not covered by CPT codes.
Revenue Code Format(revenue_code)
Validates that revenue codes are exactly 4 digits in the range 0001-9999. Revenue codes classify the type of service or department where a service was provided on institutional claims (UB-04/837I). Common codes include 0120 (Room & Board), 0250 (Pharmacy), 0301 (Lab), and 0450 (Emergency Room).
Type of Bill Code Format(type_of_bill)
Validates that the Type of Bill (TOB) code is exactly 4 characters with the correct structure: 1st digit is a leading zero, 2nd digit is facility type (1-8), 3rd digit is bill classification/care type (1-8), and 4th digit is frequency code (0-9). Used on UB-04 institutional claims. Example: 0131 = Hospital Outpatient, Admit through Discharge.
Place of Service Code Validation(place_of_service)
Validates that Place of Service (POS) codes are 2-digit codes within the CMS-defined range. POS codes identify the setting where a healthcare service was provided. Common codes: 02=Telehealth Provided Other than in Patient Home, 11=Office, 21=Inpatient Hospital, 22=On Campus-Outpatient Hospital, 23=Emergency Room, 31=Skilled Nursing Facility, 81=Independent Laboratory.
Procedure Modifier Code Format(modifier_code)
Validates that procedure modifier codes are exactly 2 alphanumeric characters. Modifiers provide additional information about a service without changing its definition. Common modifiers include 25 (Significant, Separately Identifiable E/M), 59 (Distinct Procedural Service), 76 (Repeat Procedure by Same Physician), and GT (Telemedicine). Up to 4 modifiers may appear per service line.
Claim Type Validation(claim_type)
Validates that the claim type is one of the recognized healthcare claim categories: professional (CMS-1500/837P), institutional (UB-04/837I), dental (ADA/837D), or pharmacy (NCPDP). Each claim type determines the form, required fields, and processing rules applicable to the claim.
ICD-10-CM Diagnosis Code Format(diagnosis_code)
Validates that values conform to the ICD-10-CM (Clinical Modification) diagnosis code format. The code begins with an alphabetic character (A-T, V-Z, excluding U), followed by two digits, then an optional decimal point with 1-4 additional alphanumeric characters for specificity.
ICD-10-PCS Procedure Code Format(procedure_code)
Validates that values conform to the ICD-10-PCS (Procedure Coding System) format. PCS codes are exactly 7 alphanumeric characters. The letters O and I are excluded to avoid confusion with digits 0 and 1.
National Provider Identifier (NPI) Format(npi)
Validates that values conform to the NPI (National Provider Identifier) basic format. An NPI is exactly 10 digits and must begin with 1 (individual providers) or 2 (organizational providers). This check validates structure only; use the npi-luhn-check rule to verify the check digit.
NPI Luhn Check Digit Validation(npi)
Validates the NPI check digit using the Luhn algorithm as specified in 45 CFR 162.406. The algorithm prefixes '80840' to the first 9 digits of the NPI, then applies the Luhn mod-10 formula. The 10th digit of the NPI must equal the computed check digit. This ensures the NPI is not just well-formed but mathematically valid.
Billed vs Allowed Amount Validation
Validates monetary amount relationships on healthcare claims: billed amount must be >= 0, allowed amount must be >= 0, and the allowed amount should not exceed the billed amount. These checks prevent negative charges, overpayments, and data entry errors in claims processing.
Service Date Sequence Validation
Validates the chronological sequence of service dates on healthcare claims: service from date must be on or before service to date, service from date must be on or before claim submission date, and no service dates should be in the future. Ensures temporal integrity of claim line dates.
Service Date After Patient Birth Date
Validates that the date of service is on or after the patient's date of birth. A service date before the patient's birth date indicates a data entry error, patient mismatch, or system integration issue. This is a fundamental integrity check for all healthcare claims.
Discharge Date After Admission Date
Validates that the discharge date is on or after the admission date for inpatient claims. Admission and discharge dates define the inpatient stay period and are critical for DRG assignment, per diem calculations, and length-of-stay reporting. A discharge date before the admission date indicates a data entry error or system issue.
Age-Diagnosis Compatibility Check
Validates that diagnosis codes are appropriate for the patient's age. Maternity/obstetric codes (O00-O9A) should only appear for patients aged 12-55, newborn codes (P00-P96) for age 0, and pediatric-specific codes (certain Z00 preventive codes) for ages 0-17. Age-incompatible diagnoses indicate coding errors, patient mismatch, or data quality issues.
Gender-Diagnosis Compatibility Check
Validates that diagnosis codes are appropriate for the patient's reported gender. Female-only diagnoses such as obstetric codes (O00-O9A), cervical/uterine conditions, and ovarian disorders should not appear on male patient claims. Male-only diagnoses such as prostate conditions (N40-N42), testicular disorders, and male-specific genital codes should not appear on female patient claims. Gender mismatches indicate coding errors or patient data issues.
Timely Filing Limit Check
Validates that claims are submitted within the timely filing limit from the date of service. Most payers require claims to be filed within 365 days (1 year) of the service date. Medicare requires filing within 12 months of the date of service, and many commercial payers have 90-180 day limits. Late filings result in claim denials.
Diagnosis Pointer Validation
Validates that diagnosis pointers on claim service lines reference valid diagnosis positions (1-12) that exist on the claim header. Each service line must have at least one diagnosis pointer, and each pointer must correspond to a populated diagnosis code on the claim. Invalid pointers cause claim rejections and delayed payments.