/* ============================================================================= 
Program     : HCUP_Formats.Txt                                              
Date Revised: 05/30/2008                                                   
Descripiton : 
Create SAS formats that may be used with SAS procedures to label the values of
selected HCUP categorical data elements. For example, the following SAS 
statements use the UR_CAT4F format with the Freq Procedure to label the values 
of PL_UR_CAT4 in the frequency listing:                                           
                                                             
    Proc Freq Data = NIS_2006_CORE ;                         
         Table PL_UR_CAT4 ;                                      
         Format PL_UR_CAT4  UR_CAT4F. ;                           
    Run ;                                                    
                                                             
The following tables list formats available for selected HCUP data elements. 
(Note that some data elements are not always available.)                                           

    Hospital File                                        
    Data Element(s)         Format Name(s)                   
    ===============         ==============                   
    AHAID                   $FBlank.                         
    HOSPNAME                $FBlank.                         
    HOSPADDR                $FBlank.                         
    HOSPCITY                $FBlank.                         
    HOSPZIP                 $FBlank.                         
    HOSP_BEDSIZE            FHBEDSZ.                         
    HOSP_CONTROL            FHCONTRL.                        
    HOSP_LOCATION           FHLOC.                           
    HOSP_LOCTEACH           FHLOCTCH.                        
    HOSP_REGION             FHREGION.                        
    HOSP_TEACH              FHTCH.                           
    IDNUMBER                $FBlank.                         
    NACHTYPE                FNACHTYP.
                                                             
    Core File                                            
    Data Element(s)         Format Name(s)                   
    ===============         ==============                   
    AGEDAY                  FAGEDAY.                         
    AGEMONTH                FAGEMON.
    AMONTH                  NUMMONTH.                        
    ASCHED                  FASCHED.
    ASOURCE                 FASOURCE.                        
    ASOURCEUB92             $F1UB. or $F2UB.                 
    ASOURCE_X               $FBlank.                         
    ATYPE                   FATYPE.                          
    AWEEKEND                FAWEEKEN.
    CPT1-CPTnn              $HCPCS.
    DIED                    FDIED.                           
    DISPUB92                FDISPUB.                         
    DISPUNIFORM             FDISPUNI. 
    DSHOSPID                $FBlank.                         
    DQTR                    FDQTR.                           
    ELECTIVE                FELECT.                          
    FEMALE                  FFEMALE. 
    HCUPAS                  HCUPAS.
    HCUPED                  HCUPED.
    HCUPOS                  HCUPOS. 
    Homeless                Homeless.
    LOS or LOS_X            FLOS. 
    NEOMAT                  FNEOMAT.                         
    PAY1-PAY2               FPAY.                            
    PAY1_X                  $FBlank.                         
    PAY2_X                  $FBlank.                         
    PL_MSA1993              MSA1993F.
    PL_NHCS2006             NCHSF.
    PL_RUCA10               RUCA10F.
    PL_RUCA10_2005          RUCA10F.
    PL_RUCA4                RUCA4F.
    PL_RUCA4_2005           RUCA4F.
    PL_RUCC2003             RUCC03F.
    PL_RUCC                 RUCCF.
    PL_UIC                  UICF.
    PL_UIC2003              UIC2003F.
    PL_UR_CAT4              UR_CAT4F.                        
    PL_UR_CAT5              UR_CAT5F.                        
    PRDAY1-PRDAYnn          FPRDAY.                          
    RACE                    FRACE.
    STATEAS                 STATEAS.
    STATEED                 STATEED.
    STATEOS                 STATEOS.           
    TOTCHG or TOTCHG_X      FTOTCHG.                         
    ZIPINC_Qrtl             FZIQ.                            
============================================================================= */

Proc Format ;

/* Hospital File Data Elements */
Value $FBlank /* Blank, Non-Blank */
       " " = "Blank"
     OTHER = "Non-blank"
     ;

Value FHBEDSZ /* HOSP_BEDSIZE - Bedsize of hospital */
     . = '.: Missing'
     1 = '1: Small'
     2 = '2: Medium'
     3 = '3: Large'
     ;

Value FHCONTRL /* HOSP_CONTROL - Control/ownership of hospital */
     .  = '.: Missing'
     0  = '0: Government or private (collapsed category)'
     1  = '1: Government, nonfederal (public)'         
     2  = '2: Private, not-for-profit (voluntary)'     
     3  = '3: Private, investor-owned (proprietary)'
     4  = '4: Private (collapsed category)'
     ;

Value FHREGION /* HOSP_REGION - Region of hospital */
     .  = '.: Missing'
     1 = '1: Northeast'
     2 = '2: Midwest'
     3 = '3: South'
     4 = '4: West'
     ;

Value FHLOCTCH /* HOSP_LOCTEACH - Location/teaching status of hospital */
     . = '.: Missing'
     1 = '1: Rural'
     2 = '2: Urban nonteaching'
     3 = '3: Urban teaching'
     ;

Value FHLOC /* HOSP_LOCATION - Location (urban/rural) of hospital */
     . = '.: Missing'
     0 = '0: Rural'
     1 = '1: Urban'
     ;

Value FHTCH /* HOSP_TEACH - Teaching status of hospital */
     . = '.: Missing'
     0 = '0: Nonteaching'
     1 = '1: Teaching'
     ;

Value FNACHTYP /* NACHTYPE - NACHRI hospital type */
     0 = "0: Not in NACHRI children's hospital list"
     1 = "1: Freestanding children's general hospital"
     2 = "2: Freestanding children's specialty hospital"
     3 = "3: Children's unit in a general hospital"
     . = ".: Missing"
     ;


/* Core File Data Elements */
Value F1PAY /* PAY1 - Primary payer - uniform (1988-1997) */
      1 = " 1: Medicare"
      2 = " 2: Medicaid"
      3 = " 3: Prvt. Ins/HMO"
      4 = " 4: Self-pay"
      5 = " 5: No Charge"
      6 = " 6: Other"
      . = " .: Missing"
     .A = ".A: Invalid"
     .B = ".B: Unavailable from source"
     ;

Value F2PAY /* PAY2 - Secondary payer - uniform (1988-1997) */
      1 = " 1: Medicare"
      2 = " 2: Medicaid"
      3 = " 3: Private w/HMO"
      4 = " 4: Self-pay"
      5 = " 5: No Charge"
      6 = " 6: Other"
      . = " .: Missing"
     .A = ".A: Invalid"
     .B = ".B: Unavailable from source"
     .C = ".C: Inconsistent"
     ;

Value FADAYWK /* ADAYWK - Admission day of week */
      1 = " 1: Sunday"
      2 = " 2: Monday"
      3 = " 3: Tuesday"
      4 = " 4: Wednesday"
      5 = " 5: Thursday"
      6 = " 6: Friday"
      7 = " 7: Saturday"
      . = " .: Missing"
     .A = ".A: Invalid"
     .B = ".B: Unavailable from source"
     ;
      
Value FADRGRis /* ADRGRiskMortality - All Patient Refined Risk of Mortality Subclass */
      0 = " 0: No class specified"
      1 = " 1: Minor likelihood of dying"
      2 = " 2: Moderate likelihood of dying"
      3 = " 3: Major likelihood of dying"
      4 = " 4: Extreme likelihood of dying"
      . = " .: Missing"
     .A = ".A: Invalid"
     ;
  
Value FADRGSEV /* ADRGSEV - All Patient Refined DRG Complexity Subclass */
      0 = " 0: Newborn"
      1 = " 1: Minor loss of function"
      2 = " 2: Moderate loss of function"
      3 = " 3: Major loss of function"
      4 = " 4: Extreme loss of function"
      . = " .: Missing"
     .A = ".A: Invalid"
     ;

Value FAGEDAY /* AGEDAY - Age in days (when AGE is less than 1 year) */                        
            . = " .: Missing"
           .A = ".A: Invalid"
           .B = ".B: Unavail from source"
           .C = ".C: Inconsistent"
            0 = "          0 days"
            1 = "          1 day "
            2 = "          2 days"
            3 = "          3 days"
            4 = "          4 days"
            5 = "          5 days"
            6 = "          6 days"
            7 = "          7 days"
            8 = "          8 days"
            9 = "          9 days"
           10 = "         10 days"
     11-   30 = "   11 -  30 days"   
     31-   60 = "   31 -  60 days"
     61-   90 = "   61 -  90 days"
     91-  120 = "   91 - 120 days"
    121-  150 = "  121 - 150 days"
    151-  180 = "  151 - 180 days"
    181-  210 = "  181 - 210 days"
    211-  240 = "  211 - 240 days"
    241-  270 = "  241 - 270 days"
    271-  300 = "  271 - 300 days"
    301-  330 = "  301 - 330 days"
    331-  364 = "  331 - 364 days"
    ;

Value FAGEMON /* AGEMONTH - Age in months (when AGE is less than 11 years) */       
            . = " .: Missing"
           .A = ".A: Invalid"
           .B = ".B: Unavail from source"
           .C = ".C: Inconsistent"
            0 = "        0 months"
            1 = "        1 month "
            2 = "        2 months"
            3 = "        3 months"
            4 = "        4 months"
            5 = "        5 months"
            6 = "        6 months"
            7 = "        7 months"
            8 = "        8 months"
            9 = "        9 months"
           10 = "       10 months"
           11 = "       11 months"
           12 = "       12 months"
     13-   24 = " 13 -  24 months"   
     25-   36 = " 25 -  36 months"
     37-   48 = " 37 -  48 months"
     49-   60 = " 49 -  60 months"
     61-   72 = " 61 -  72 months"
     73-   84 = " 73 -  84 months"
     85-   96 = " 85 -  96 months"
     97-  108 = " 97 - 108 months"
    109-  120 = "109 - 120 months"
    121-  131 = "121 - 131 months"
    ;

Value FAMONTH /* AMONTH - Admission month */
    . = ' .: Missing'
   .A = '.A: Invalid'
   .B = '.B: Unaval fr src'
    1 = ' 1: January'
    2 = ' 2: February'
    3 = ' 3: March'
    4 = ' 4: April'
    5 = ' 5: May'
    6 = ' 6: June'
    7 = ' 7: July'
    8 = ' 8: August'
    9 = ' 9: September'
   10 = '10: October'
   11 = '11: November'
   12 = '12: December'
   ;

Value FANESTH /* ANESTH - Method of anesthesia */
       0 =  " 0: No anesthesia"
      10 =  "10: Local anesthesia"
      20 =  "20: General anesthesia"
      30 =  "30: Regional anesthesia"
      40 =  "40: Other anesthesia"
       . =  " .: Missing"
      .A =  ".A: Invalid"
      ;

Value FASCHED /* ASCHED - Scheduled versus unscheduled admission */
       0  =  " 0: Unscheduled admission"
       1  =  " 1: Scheduled admission"
       .  =  " .: Missing"
       .A =  ".A: Invalid"
       ;

Value FASOURCE /* ASOURCE - Admission source, uniform coding */
       . = " .: Missing"
      .A = ".A: Invalid"
      .B = ".B: Unavailable from source"
       1 = " 1: Emergency department"
       2 = " 2: Another hospital"
       3 = " 3: Other health facility, including LTC"
       4 = " 4: Court/law enforcement"
       5 = " 5: Routine, birth, and other"
       ;

Value FATYPE /* ATYPE - Admission type */
       . = " .: Missing"
      .A = ".A: Invalid"
      .B = ".B: Unavail from source"
       1 = " 1: Emergency"
       2 = " 2: Urgent"
       3 = " 3: Elective"
       4 = " 4: Newborn"
       5 = " 5: Trauma center"
       6 = " 6: Other"
       ;

Value FAWEEKEND /* AWEEKEND - Admission day is on a weekend */
        . = " .: Missing"
       .A = ".A: Invalid"
        0 = " 0: Monday-Friday"
        1 = " 1: Saturday-Sunday"
       ;

Value FDCCSPDX /* DXCCSn - Clinical Classifications Software (CCS): diagnosis classification, collapsed categories */
         . = " .: No diagnosis code"
        .A = ".A: Invalid diagnosis"
        .C = ".C: Inconsistent diagnosis"
     1- 10 = " 1: Infectious and Parasitic DX"
    11- 47 = " 2: Neoplasms"
    48- 58 = " 3: Endocr, Nutri, Metab, Immun DX"
    59- 64 = " 4: Dx of Blood, Blood-Forming Organs"
    65- 75 = " 5: Mental Disorders"
    76- 95 = " 6: Dx of Nervous System, Sense Organs"
    96-121 = " 7: Dx of Circulatory System"
   122-134 = " 8: Dx of Respiratory System"
   135-155 = " 9: Dx of Digestive System"
   156-175 = "10: Dx of Genitourinary System"
   176-196 = "11: Complic Preg, Birth, Puerperium"
   197-200 = "12: Dx of Skin and Subcutaneous Tissue"
   201-212 = "13: Dx of Musculoskel, Connective Tissue"
   213-217 = "14: Congenital Anomalies"
   218-224 = "15: Perinatal Conditions"
   225-244 = "16: Injury and Poisoning"
   245-259 = "17: Other Conditions"
       260 = "18: E codes"
 2601-2621 = "18: E codes"
 ;

Value FDIED /* DIED - Died during hospitalization */
       . = " .: Missing"
      .A = ".A: Invalid"
      .B = ".B: Unavailable from source"
       0 = " 0: Did not die in hospital"
       1 = " 1: Died in hospital"
       ;

Value FDISP /* DISP - Disposition of patient */
      1 = " 1: Routine"
      2 = " 2: Short-term Hsp"
      3 = " 3: SNF "
      4 = " 4: ICF "
      5 = " 5: Other Facility"
      6 = " 6: Home Health   "
      7 = " 7: AMA "
     20 = "20: Died"
      . = " .: Missing"
     .A = ".A: Invalid"
     .B = ".B: Unavailable from source"
     ;

Value FDISPH /* DISPUniform - Disposition of patient, uniform coding, HCUP3 (1988-1997) */
       1 =  " 1: Routine"
       2 =  " 2: Transfer: short-term hospital"
       3 =  " 3: Skilled nursing facility"
       4 =  " 4: Intermediate care facility"
       5 =  " 5: Transfer: other type of facility"
       6 =  " 6: Home health care"
       7 =  " 7: Against medical advice"
      20 =  "20: Died in hospital"
      99 =  "99: Discharged alive, destination unknown"
       . =  " .: Missing"
      .A =  ".A: Invalid"
      ;

Value FDISPUNI /* DISPUniform - Disposition of patient, uniform coding */
       . = " .: Missing"
      .A = ".A: Invalid"
       1 = " 1: Routine"
       2 = " 2: Transfer: short-term hospital"
       5 = " 5: Transfer: other type of facility"
       6 = " 6: Home health care"
       7 = " 7: Against medical advice"
      20 = "20: Died in hospital"
      99 = "99: Discharged alive, destination unknown"
      ;

Value FDISPUB /* DISPUB92 - Disposition of patient, UB92 coding */
       . = " .: Missing"
      .A = ".A: Invalid"
       1 = " 1: Routine"
       2 = " 2: Short-term hospital"
       3 = " 3: Skilled nursing facility"
       4 = " 4: Intermediate facility"
       5 = " 5: Another type of facility (for inpatient care)"
       6 = " 6: Home health care"
       7 = " 7: Against medical advice"
       8 = " 8: Home IV provider"
       9 = " 9: Admitted as an inpatient to this hospital"
      20 = "20: Died in hospital"
      40 = "40: Died at home"
      41 = "41: Died in a medical facility"
      42 = "42: Died, place unknown" 
      43 = "43: Federal health facility"      
      50 = "50: Hospice - home"         
      51 = "51: Hospice - medical facility"
      61 = "61: This institution to a swing bed"
      62 = "62: Another rehab facility including distinct rehab units of a hospital"
      63 = "63: Long term care hospital swing bed"
      64 = "64: Nursing facility certified under Medicaid but not certified under Medicare"
      65 = "65: Discharged/transferred to a psychiatric hospital or psychiatric distinct part unit of a hospital"  
      66 = "66: Discharged/transferred to a critical access hospital"
      71 = "71: Another institution for outpatient services"
      72 = "72: This institution for outpatient services"
      99 = "99: Discharged alive, destination unknown"
      ;

Value FDNR /* DNR - Do not resuscitate */
        0 = " 0: No do not resuscitate order"
        1 = " 1: Do not resuscitate order"
        . = " .: Missing"
       .A = ".A: Invalid"
       ;

Value FDQTR /* DQTR - Discharge quarter */
      0 = "0: Missing/invalid"
      1 = "1: First quarter "
      2 = "2: Second quarter"
      3 = "3: Third quarter "
      4 = "4: Fourth quarter"
      ;

Value FDXADMIT /* DXatAdmitn - Diagnosis present at admission */
       0 = " 0: DX not present at admission"
       1 = " 1: DX present at admission"
       . = " .: Missing or DX is an E code"
      .A = ".A: Invalid"
      ;

Value FDXSYS /* DXSYS - Diagnosis system */
      1 = " 1: ICD-9-CM"
      . = " .: Missing"
     .A = ".A: Invalid"
     ;

Value FELECT /* ELECTIVE - Elective versus non-elective admission */
  . = ' .: Missing'
 .A = '.A: Invalid'
  0 = ' 0: Non-elective admission'
  1 = ' 1: Elective admission'
  ;

Value FFEMALE /* FEMALE - Indicator of sex */
   .  = ' .: Missing'
   .A = '.A: Invalid'
   .C = '.C: Inconsistent'
    0 = ' 0: Male'
    1 = ' 1: Female'
    ;

Value FLOS /* LOS - Length of stay, cleaned; LOS_X - Length of stay, as received from data source */
           . = " .: Missing"
          .A = ".A: Invalid"
          .B = ".B: Unavail from source"
          .C = ".C: Inconsistent "
           0 = "           0 days"
           1 = "           1 day "
           2 = "           2 days"
           3 = "           3 days"
           4 = "           4 days"
           5 = "           5 days"
           6 = "           6 days"
           7 = "           7 days"
           8 = "           8 days"
           9 = "           9 days"
          10 = "          10 days"
    11-   30 = "   11 -   30 days"   
    31-   60 = "   31 -   60 days"
    61-   90 = "   61 -   90 days"
    91-  120 = "   91 -  120 days"
   121-  150 = "  121 -  150 days"
   151-  180 = "  151 -  180 days"
   181-  210 = "  181 -  210 days"
   211-  240 = "  211 -  240 days"
   241-  270 = "  241 -  270 days"
   271-  300 = "  271 -  300 days"
   301-  330 = "  301 -  330 days"
   331-  365 = "  331 -  365 days"
   366- 1095 = "  365 - 1095 days"
   ;

Value FMQSEVER /* MQSEVER - MediQual Admission Severity Code */
       0 = " 0: No organ failure indication" 
       1 = " 1: Low organ failure indication" 
       2 = " 2: Moderate organ failure indication"
       3 = " 3: High organ failure indication"
       4 = " 4: Existing organ failure"
       . = " .: Missing"
      .A = ".A: Invalid"
      ;

Value FNEOMAT /* NEOMAT - Neonatal and/or maternal DX and/or PR */
       . =  ".: Missing"
       0 = "0: Not neonatal or maternal"
       1 = "1: Maternal"
       2 = "2: Neonatal"
       3 = "3: Neonatal and maternal"
       ;

Value FPAY /* PAY1 - Expected primary payer, uniform; PAY2 - Expected secondary payer, uniform */
        . = " .: Missing"
       .A = ".A: Invalid"
        1 = " 1: Medicare"
        2 = " 2: Medicaid"
        3 = " 3: Private insurance"
        4 = " 4: Self-pay"
        5 = " 5: No charge"
        6 = " 6: Other"
       ;

Value FPRDAY /* PRDAYn - Number of days from admission to procedure n */      
           . = " .: Missing"
          .A = ".A: Invalid"
          .B = ".B: Unavail from source"
          .C = ".C: Inconsistent"
          -4 = "       -4 days"
          -3 = "       -3 days"
          -2 = "       -2 days"
          -1 = "       -1 day "
           0 = "        0 days"
           1 = "        1 day "
           2 = "        2 days"
           3 = "        3 days"
           4 = "        4 days"
           5 = "        5 days"
     6-   30 = "  6 -  30 days"
    31-   60 = " 31 -  60 days"
    61-   90 = " 61 -  90 days"
    91-  120 = " 91 - 120 days"
   121-  150 = "121 - 150 days"
   151-  180 = "151 - 180 days"
   181-  210 = "181 - 210 days"
   211-  240 = "211 - 240 days"
   241-  270 = "241 - 270 days"
   271-  300 = "271 - 300 days"
   301-  330 = "301 - 330 days"
   331-  365 = "331 - 365 days"
   ;

Value FPROFEE /* PROFEE - Indicator of professional fees in total charges */
      1 = " 1: Professional fees included in TOTCHG" 
      2 = " 2: No professional fees in TOTCHG"
      . = " .: Missing"
     .A = ".A: Invalid"
      ;

Value FPRSYS /* PRSYS - Procedure system */
      1 = " 1: ICD-9-CM"
      2 = " 2: CPT-4"
      3 = " 3: HCPCS/CPT-4"
      . = " .: Missing"
     .A = ".A: Invalid"
     ;
       
Value FRACE /* RACE - Race */
      . = " .: Missing"
     .A = ".A: Invalid"
     .B = ".B: Unavailable from source"
      1 = " 1: White"
      2 = " 2: Black"
      3 = " 3: Hispanic"
      4 = " 4: Asian/Pacific Islander"
      5 = " 5: Native American"
      6 = " 6: Other"
     ;

Value FREADMIT /* READMIT - Readmission */
      0 = " 0: Not a readmission" 
      1 = " 1: Readmission"
      . = " .: Missing"
     .A = ".A: Invalid"
     ;

Value FTOTCHG /* TOTCHG - Total charges, cleaned; TOTCHG_X - Total charges, as received from data source */
                 .  = "    .: Missing"
                 .A = "   .A: Invalid"
                 .C = "   .C: Inconsistent"
      0.0-<0.5      = "                $ 0"
      0.5-<4.5      = "     $ 1-       $ 4"
      4.5-<14.5     = "     $ 5-       $14"
     14.5-<24.5     = "     $15-       $24"
     24.5-<1000.5   = "     $25-    $1,000"
   1000.5-<5000.5   = "  $1,001-    $5,000"
   5000.5-<10000.5  = "  $5,001-   $10,000"
  10000.5-<50000.5  = " $10,001-   $50,000"
  50000.5-<100000.5 = " $50,001-  $100,000"
 100000.5-<200000.5 = "$100,001-  $200,000"
 200000.5-<300000.5 = "$200,001-  $300,000"
 300000.5-<400000.5 = "$300,001-  $400,000"
 400000.5-<500000.5 = "$400,001-  $500,000"
 500000.5-<1000000.5= "$500,001-$1,000,000"
1000000.5-High      = "    Over $1,000,000"
; 

Value FZIP4INC /* ZIPINC4 - Median income for patient's ZIP Code (4 categories) */
      1 = "1:      $0-$25,000"
      2 = "2: $25,001-$30,000"
      3 = "3: $30,001-$35,000"
      4 = "4: $35,001+"
      . = ".: Missing"
      ;

Value FZIP8INC /* ZIPINC8 - Median income for patient's ZIP Code (8 categories) */
      1 = "1:      $0-$15,000"
      2 = "2: $15,001-$20,000"
      3 = "3: $20,001-$25,000"
      4 = "4: $25,001-$30,000"
      5 = "5: $30,001-$35,000"
      6 = "6: $35,001-$40,000"
      7 = "7: $40,001-$45,000"
      8 = "8: $45,001+"
      . = ".: Missing"
      ;

Value FZIPINC /* ZIPINC - Median household income for patient's ZIP Code (based on 1999 demographics) */
     . = '.: Missing'
     1 = '1:      $0-$24,999'
     2 = '2: $25,000-$34,999'
     3 = '3: $35,000-$44,999'
     4 = '4: $45,000+'
     ;

Value FZIQ /* ZIPINC_QRTL - Median household income for patient's ZIP Code (based on current year) */
     . = '.: Missing'
     1 = '1: First quartile'     
     2 = '2: Second quartile'
     3 = '3: Third quartile'
     4 = '4: Fourth quartile'
     ;        
             
Value HCUPAS /* HCUPAS - HCUP Ambulatory Surgery service indicator */
      0 = ' 0: Record does not meet any HCUP Ambulatory Surgery criteria'
      1 = ' 1: Ambulatory Surgery ICD-9-CM procedure code on record'
      2 = ' 2: Ambulatory Surgery CPT procedure code on record'
      3 = ' 3: Ambulatory Surgery revenue code on record'
      4 = ' 4: UB-92 bill type of "83X"'
      ;

Value HCUPED /* HCUPED - HCUP Emergency Department service indicator */
      0 = " 0: Record does not meet any HCUP Emergency Department criteria"
      1 = " 1: Emergency Department revenue code on record"
      2 = " 2: Positive Emergency Department charge (when revenue center codes are not available)"
      3 = " 3: Emergency Department CPT procedure code on record"
      4 = " 4: Emergency Department admission source"
      ;

Value HCUPOS /* HCUPOS - HCUP Observation Stay service indicator */
      0 = " 0: Record does not meet any HCUP Observation Stay criteria"
      1 = " 1: Observation Stay revenue code on record"
      2 = " 2: Positive Observation Stay charge (when revenue center codes are not available))"
      3 = " 3: Observation Stay CPT procedure code on record"
      ;

Value Homeless /* Homeless - Indicator that patient is homeless */
      0 = " 0: Not identified as homeless"
      1 = " 1: Homeless"
      . = " .: Missing"
     .A = ".A: Invalid"
     ;

Value IntensiveCare /* INTENSIVECARE - Indicator of type of intensive care received by patient */
      0 = " 0: No Intensive Care"
      1 = " 1: Neonatal ICU"
      2 = " 2: Surgical/Medical"
      3 = " 3: Pediatric"
      4 = " 4: Psychiatric"
      5 = " 5: Burn Care"
      6 = " 6: Trauma"
      7 = " 7: General/Post ICU"
      8 = " 8: Heart Transplant"
      9 = " 9: General / Mycardial Infarction / Pulmonary Care/Post CCU/Other Coronary Care"
      . = " .: Missing"
     .A = ".A: Invalid"
     ;

Value MSA1993F /* PL_MSA1993 - Patient location: Metropolitan Statistical Area (MSA) 1993 */
      0 = "0: Non-MSA"
      1 = "1: MSA"
      . = ".: Missing"
      ;

Value NCHSF /* PL_NHCS2006 - Patient Location: National Center for Health Statistics (NCHS2006) */
      1 = "1: Large Central Metro" 
      2 = "2: Large Fringe Metro"
      3 = "3: Medium Metro"
      4 = "4: Small Metro"
      5 = "5: Micropolitan"
      6 = "6: Noncore"
      . = ".: Missing"
      ;

Value NUMDAYS /* DaysBurnUnit, DaysCCU, DaysICU, DaysNICU, DaysPICU, DaysShockUnit */
            . = " .: Missing"
           .A = ".A: Invalid"
           .N = ".N: Not applicable"
            0 = "          0 days"
            1 = "          1 day "
            2 = "          2 days"
            3 = "          3 days"
            4 = "          4 days"
            5 = "          5 days"
            6 = "          6 days"
            7 = "          7 days"
            8 = "          8 days"
            9 = "          9 days"
           10 = "         10 days"
     11-   20 = "   11 -  20 days"   
     21-   50 = "   21 -  50 days"
     51-  100 = "   51 - 100 days"
    101-  365 = "  101 - 365 days"
    ;

Value NUMMONTH /* AMONTH - Admission month */                      
      . = " .: Missing"
     .A = ".A: Invalid"
      1 = " 1: January"
      2 = " 2: February"
      3 = " 3: March"
      4 = " 4: April"
      5 = " 5: May"
      6 = " 6: June"
      7 = " 7: July"
      8 = " 8: August"
      9 = " 9: September"
     10 = "10: October"
     11 = "11: November"
     12 = "12: December"
     ;

Value RUCA10F /* PL_RUCA10, PL_RUCA10_2005 - Patient location: Rural-Urban Commuting Area (RUCA) Codes, ten levels */
      1  = " 1: Metro core"
      2  = " 2: Metro area, commuting to urban areas"
      3  = " 3: Metro area, low commuting"
      4  = " 4: Large town core (10,000 - 50,000)"
      5  = " 5: Large town, commuting to large towns"
      6  = " 6: Large towns, low commuting"
      7  = " 7: Small town core (2,500 - 10,000)"
      8  = " 8: Small town, commuting to small towns"
      9  = " 9: Small town, low commuting"
     10  = "10: Rural"
      .  = " .: Missing"
      ;

Value RUCA4F /* PL_RUCA4, PL_RUCA4_2005 - Patient location: Rural-Urban Commuting Area (RUCA) Codes, four levels */
      1 = "1: Urban" 
      2 = "2: Large town (rural)"
      3 = "3: Small town (rural)"
      4 = "4: Isolated rural"
      . = ".: Missing"
      ;

Value RUCC03F /* PL_RUCC2003 - Patient location: Rural-Urban Continuum (RUCC) Codes, 2003 */
      1  = "1: Metro - Counties in metro areas of 1 million population or more"
      2  = "2: Metro - Counties in metro areas of 250,000 to 1 million population"
      3  = "3: Metro - Counties in metro areas of fewer than 250,000 population"
      4  = "4: Non-Metro - Urban population of 20,000 or more, adjacent to a metro area"
      5  = "5: Non-Metro - Urban population of 20,000 or more, not adjacent to a metro area"
      6  = "6: Non-Metro - Urban population of 2,500 to 19,999, adjacent to a metro area"
      7  = "7: Non-Metro - Urban population of 2,500 to 19,999, not adjacent to a metro area"
      8  = "8: Non-Metro - Completely rural or less than 2,500 urban population, adjacent to a metro area"
      9  = "9: Non-Metro - Completely rural or less than 2,500 urban population, not adjacent to a metro area"
      .  = ".: Missing"
      ;

Value RUCCF /* PL_RUCC - Patient location: Rural-Urban Continuum (RUCC) Codes */
      0  = "0: Metro - Central counties of metro areas, population >= 1 million"
      1  = "1: Metro - Fringe counties of metro areas, population >= 1 million"
      2  = "2: Metro - Counties in metro areas, population of 250,000 to 1 million"
      3  = "3: Metro - Counties in metro areas, population < 250,000 "
      4  = "4: Non-Metro - Urban population of 20,000 or more, adjacent to a metro area"
      5  = "5: Non-Metro - Urban population of 20,000 or more, not adjacent to a metro area"
      6  = "6: Non-Metro - Urban population of 2,500 to 19,999, adjacent to a metro area"
      7  = "7: Non-Metro - Urban population of 2,500 to 19,999, not adjacent to a metro area"
      8  = "8: Non-Metro - Completely rural or less than 2,500 urban population, adjacent to a metro area"
      9  = "9: Non-Metro - Completely rural or less than 2,500 urban population, not adjacent to a metro area "
      .  = ".: Missing"
      ;

Value STATEAS /* STATEAS - State Ambulatory Surgery service indicator */
      0 = " 0: Record does not meet state Ambulatory Surgery criteria"
      1 = " 1: Record meets state Ambulatory Surgery criteria"
      . = " .: Missing"
     .A = ".A: Invalid"
     ;

Value STATEED /* STATEED - State Emergency Department service indicator */                    
      0 = " 0: Record does not meet state Emergency Department criteria"
      1 = " 1: Record meets state Emergency Department criteria"
      . = " .: Missing"
     .A = ".A: Invalid"
     ;

Value STATEOS /* STATEOS - State Observation Stay service indicator */                    
      0 = " 0: Record does not meet state Observation Stay criteria"
      1 = " 1: Record meets state Observation Stay criteria"
      . = " .: Missing"
     .A = ".A: Invalid"
     ;

Value UIC2003F /* PL_UIC2003 - Patient location: Urban Influence Codes, 2003 */
      1  = " 1: Metro - Large metro area of 1 million residents or more"
      2  = " 2: Metro - Small metro area of less than 1 million residents"
      3  = " 3: Non-Metro - Micropolitan adjacent to large metro"
      4  = " 4: Non-Metro - Noncore adjacent to large metro"
      5  = " 5: Non-Metro - Micropolitan adjacent to small metro"
      6  = " 6: Non-Metro - Noncore adjacent to small metro with own town"
      7  = " 7: Non-Metro - Noncore adjacent to small metro no own town"
      8  = " 8: Non-Metro - Micropolitan not adjacent to a metro area"
      9  = " 9: Non-Metro - Noncore adjacent to micro with own town"
      10 = "10: Non-Metro - Noncore adjacent to micro with no own town"
      11 = "11: Non-Metro - Noncore not adjacent to metro or micro with own town"
      12 = "12: Non-Metro - Noncore not adjacent to metro or micro with no own town Missing"
      .  = " .: Missing"
      ;

Value UICF /* PL_UIC - Patient location: Urban influence codes */
      1  = "1: Metro - Large, metro area with  >= 1 million residents  "
      2  = "2: Metro - Small, metro area with  < 1 million residents"
      3  = "3: Non-Metro - Adjacent to large metro area and contains city of >= 10,000 residents "
      4  = "4: Non-Metro - Adjacent to large metro area and contains city of < 10,000 residents "
      5  = "5: Non-Metro - Adjacent to small metro area and contains city of >= 10,000 residents "
      6  = "6: Non-Metro - Adjacent to small metro area and contains city of < 10,000 residents "
      7  = "7: Non-Metro - Not adjacent to metro area and contains city of >= 10,000 residents"
      8  = "8: Non-Metro - Not adjacent to metro area and contains town of 2,500 - 9,999 residents  "
      9  = "9: Non-Metro - Not adjacent to metro area and contains town with < 2,500 residents "
      .  = ".: Missing"
      ;

Value UR_CAT4F /* PL_UR_CAT4 - Patient Location: Urban-Rural 4 Categories */
      . = ".: Missing"
      1 = "1: Large metropolitan areas with at least 1 million residents" 
      2 = "2: Small metropolitan areas with less than 1 million residents"
      3 = "3: Micropolitan areas"
      4 = "4: Non-urban"
      ;

Value UR_CAT5F /* PL_UR_CAT5 - Patient Location: Urban-Rural 5 Categories */
      . = ".: Missing"
      1 = "1: Large metropolitan areas with at least 1 million residents" 
      2 = "2: Small metropolitan areas with less than 1 million residents"
      3 = "3: Micropolitan areas"
      4 = "4: Non-urban areas adjacent to a metropolitan or micropolitan area"
      5 = "5: Non-urban areas, not adjacent to a metropolitan or micropolitan area"
      ;

Value $F1UB /* ASOURCEUB92 for ATYPE NE 4 */
       "1" =  "1: Physician referral"
       "2" =  "2: Clinic referral"
       "3" =  "3: HMO referral"
       "4" =  "4: Transfer from a hospital"
       "5" =  "5: Transfer from a skilled nursing facility"
       "6" =  "6: Transfer from another health care facility"
       "7" =  "7: Emergency room"
       "8" =  "8: Court/law enforcement"
       "A" =  "A: Transfer from a critical access hospital"
       " " =  "   Blank/invalid"
       ;

Value $F2UB /* ASOURCEUB92 for ATYPE EQ 4 */
       "1" =  "1: Normal delivery"
       "2" =  "2: Premature delivery"
       "3" =  "3: Sick baby"
       "4" =  "4: Extramural birth"
       " " =  "   Blank/invalid"
       ;

Value $FMQGrouperCell /* MQGrouperCell - MediQual Total Charges Grouper Cell */
      "0" = "0: None"
      "1" = "1: Minimal"
      "2" = "2: Moderate"
      "3" = "3: Severe"
      "4" = "4: Maximal"
      " " = "   Missing"
      "A" = "A: Invalid"
      ;

Value $FMQNORES /* MQNORESP - MediQual Midstay Nonresponder Indicator */
      "Y" = "Y: Patient is nonresponder"
      "N" = "N: Patient responding to treatment"
      "I" = "I: Patient ineligible for calculation"
      " " = "   Missing"
      "A" = "A: Invalid"
      ;

Value $HCPCS /* CPTn - CPT-4/HCPCS procedures */
            ' '     = 'Blank'
            'invl'  = 'Invalid CPT/HCPCS (invl)'
            'incn2' = 'CPT/HCPCS inconsistent with sex'
            'incn3' = 'CPT/HCPCS inconsistent with age'
  '00100' - '01999' = 'Anesthesia'                      /* Level I - CPT Codes */
  '10040' - '69990' = 'Surgery'
  '70010' - '79999' = 'Radiology'
  '80049' - '89399' = 'Pathology and Laboratory'
  '90281' - '99199' = 'Medicine'
  '99201' - '99499' = 'Evaluation and Management'
  'A0000' - 'A0999' = 'Transportation'                  /* Level II - National Codes */
  'A2000' - 'A2999' = 'Chiropractic'
  'A4000' - 'A4999' = 'Medical and Surgical Supplies'
  'A9000' - 'A9999' = 'Miscellaneous and Experimental'
  'B4000' - 'B9999' = 'Enteral and Parenteral Therapy'
  'D0000' - 'D9999' = 'Dental'
  'E0000' - 'E9999' = 'Durable Medical Equipment'
  'G0000' - 'G9999' = 'Temporary Procedures/Services'
  'H5000' - 'H5999' = 'Rehabilitation'
  'J0000' - 'J8999' = 'Drugs (Non-oral)'
  'J9000' - 'J9999' = 'Chemotherapy Drugs'
  'K0000' - 'K9999' = 'Temporary Dmercs'
  'L0000' - 'L4999' = 'Orthotic'
  'L5000' - 'L9999' = 'Prosthetic'
  'M0000' - 'M9999' = 'Medicine'
  'P0000' - 'P9999' = 'Pathology and Laboratory'
  'Q0000' - 'Q0099' = 'Temporary Codes'
  'R0000' - 'R5999' = 'Radiology'
  'S0000' - 'S9999' = 'Private Payer Codes'
  'V0000' - 'V2999' = 'Vision'
  'V5000' - 'V5999' = 'Hearing'
  'W0000' - 'Z9999' = 'Local Codes'                     /* Level III - Local Codes */
            OTHER   = 'Other'
            ;

Value $MaritalStatus /* MARITALSTATUS - Marital status of patient */
       "M" =  "M: Married"
       "S" =  "S: Single"
       "D" =  "D: Divorced"
       "X" =  "X: Legally Separated"
       "P" =  "P: Life Partner"
       "W" =  "W: Widowed"
       " " =  " : Unknown, Missing"
       "A" =  "A: Invalid"
       ;

Value $RevFGS /* REVCDn - Revenue code */
       "    " =  "Blank"
       "0001" =  "0001: Total Charge"
"0100"-"0109" =  "010x: All Inclusive Rate"
"0110"-"0119" =  "011x: Room & Board -Private"
"0120"-"0129" =  "012x: Room & Board -Semi-Private 2 bed"
"0130"-"0139" =  "013x: Room & Board -Semi-Private 3-4 bed"
"0140"-"0149" =  "014x: Room & Board -Private Deluxe"
"0150"-"0159" =  "015x: Room & Board -Ward"
"0160"-"0169" =  "016x: Room & Board -Other"
"0170"-"0179" =  "017x: Nursery"
"0180"-"0189" =  "018x: Leave of Absence"
"0190"-"0199" =  "019x: Subacute Care"
"0200"-"0209" =  "020x: Intensive Care"
"0210"-"0219" =  "021x: Coronary Care"
"0220"-"0229" =  "022x: Special Charges"
"0230"-"0239" =  "023x: Incremental Nursing Charge Rate"
"0240"-"0249" =  "024x: All inclusive Ancillary"
"0250"-"0259" =  "025x: Pharmacy"
"0260"-"0269" =  "026x: IV Therapy"
"0270"-"0279" =  "027x: Med/Surg Supplies and Devices"
"0280"-"0289" =  "028x: Oncology"
"0290"-"0299" =  "029x: Durable medical equipment"
"0300"-"0309" =  "030x: Laboratory"
"0310"-"0319" =  "031x: Laboratory pathology"
"0320"-"0329" =  "032x: Radiology -Diagnostic"
"0330"-"0339" =  "033x: Radiology -Theurapeutic"
"0340"-"0349" =  "034x: Nuclear Medicine"
"0350"-"0359" =  "035x: CT scan"
"0360"-"0369" =  "036x: Operating Rm"
"0370"-"0379" =  "037x: Anesthesia"
"0380"-"0389" =  "038x: Blood"
"0390"-"0399" =  "039x: Blood admin & storage"
"0400"-"0409" =  "040x: Other Imaging Services"
"0410"-"0419" =  "041x: Respiratory Services"
"0420"-"0429" =  "042x: Physical Therapy"
"0430"-"0439" =  "043x: Occupational Therapy"
"0440"-"0449" =  "044x: Speech Pathology"
"0450"-"0459" =  "045x: Emergency Room"
"0460"-"0469" =  "046x: Pulmonary Function"
"0470"-"0479" =  "047x: Audiology"
"0480"-"0489" =  "048x: Cardiology"
"0490"-"0499" =  "049x: Ambulatory Surgical Care"
"0500"-"0509" =  "050x: Outpatient Services"
"0510"-"0519" =  "051x: Clinic"
"0520"-"0529" =  "052x: Free-standing clinic"
"0530"-"0539" =  "053x: Osteopathic services"
"0540"-"0549" =  "054x: Ambulance"
"0550"-"0559" =  "055x: Skilled Nursing"
"0560"-"0569" =  "056x: Medical Social Services"
"0570"-"0579" =  "057x: Home Health Aide"
"0580"-"0589" =  "058x: Home Health Other Visit"
"0590"-"0599" =  "059x: Home Health Units of Service"
"0600"-"0609" =  "060x: Home Health Oxygen"
"0610"-"0619" =  "061x: Magnetic Resonance Technology"
"0620"-"0629" =  "062x: Med/Surg Supplies and Devices"
"0630"-"0639" =  "063x: Pharmacy"
"0640"-"0649" =  "064x: Home IV Therapy Services"
"0650"-"0659" =  "065x: Hospice"
"0660"-"0669" =  "066x: Respite Care"
"0670"-"0679" =  "067x: Outpatient Special Residence"
"0680"-"0689" =  "068x: Trauma Response"
"0690"-"0699" =  "069x: Not Assigned"
"0700"-"0709" =  "070x: Cast Room"
"0710"-"0719" =  "071x: Recovery Room"
"0720"-"0729" =  "072x: Labor Room/Delivery"
"0730"-"0739" =  "073x: Electrocardiogram"
"0740"-"0749" =  "074x: Electroencephalogram"
"0750"-"0759" =  "075x: Gastro-intestinal services"
"0760"-"0769" =  "076x: Treatment/Observation Room"
"0770"-"0779" =  "077x: Preventive Care Services"
"0780"-"0789" =  "078x: Telemedicine"
"0790"-"0799" =  "079x: Extra-Corporeal Shock Wave Therapy"
"0800"-"0809" =  "080x: Renal Dialysis -Inpatient"
"0810"-"0819" =  "081x: Organ Acquisition"
"0820"-"0829" =  "082x: Hemodialysis -OP or home"
"0830"-"0839" =  "083x: Peritoneal Dialysis -OP or home"
"0840"-"0849" =  "084x: Continuous ambulatory peritoneal dialysis (CAPD) -OP or home"
"0850"-"0859" =  "085x: Continuous cycling peritoneal dialysis (CCPD) -OP or home"
"0880"-"0889" =  "088x: Dialysis -Miscellaneous"
"0900"-"0909" =  "090x: Behavioral Health Treatment"
"0910"-"0919" =  "091x: Behavioral Health Treatment"
"0920"-"0929" =  "092x: Other Diagnostic Services"
"0930"-"0939" =  "093x: Medical Rehab Day Program"
"0940"-"0949" =  "094x: Other Theurapeutice Services"
"0950"-"0959" =  "095x: Other Theurapeutice Services"
"0960"-"0969" =  "096x: Professional Fees"
"0970"-"0979" =  "097x: Professional Fees"
"0980"-"0989" =  "098x: Professional Fees"
"0990"-"0999" =  "099x: Convenience Items"
"1000"-"1009" =  "100x: Behavioral Health Accomodations"
"2100"-"2109" =  "210x: Alternative Therapy Services"
"3100"-"3109" =  "310x: Adult Care"
;
Run ;