/* SHORT TITLE:  Provider Billing Data-Pharmacy   */
PROC FORMAT
;
VALUE $PFORM_F
  'T' = 'INPATIENT STAY B'
  'V' = 'AMBULATORY BILLI'
  'Y' = 'HOME HEALTH BILL'
  'Z' = 'PHARMACY BILLING'
;
VALUE  PRECORF
   01  = 'RECORD NUMBER   '
;
VALUE $IEVENTF
  'Y' = 'YES             '
;
VALUE $OWNSHPF
  '1' = 'PUBLIC HOSPITAL/'
  '2' = 'PRIVATE HOSPITAL'
  '3' = 'FEDERALLY OWNED '
;
VALUE  CARETYF
   01  = 'INPATIENT STAY  '
   02  = 'NURSING HOME STA'
   03  = 'SEPARATE BILLING'
   04  = 'EMERGENCY ROOM  '
   05  = 'HOSPITAL CLINIC '
   06  = 'COMMUNITY CLINIC'
   07  = 'PRIVATE MD      '
   08  = 'MENTAL HEALTH - '
   09  = 'MENTAL HEALTH - '
   10  = 'OTHER MEDICAL PR'
   11  = 'ALTERNATIVE THER'
   12  = 'DRUG/ALCOHOL TRE'
   13  = 'HOME HEALTH     '
   14  = 'MEDICAL EQUIPMEN'
   15  = 'PRESCRIPTION MED'
   16  = 'UNKNOWN         '
;
VALUE  PRBEGMF
   99  = 'NOT ASCERTAINED '
;
VALUE $NUMNIGF
  '999' = 'NOT ASCERTAINED '
;
VALUE $FLG_ILF
  '0' = 'ITEM NOT IMPUTED'
  'E' = 'RESULT OF EVENT '
  'M' = 'RESULT OF MISSIN'
  'P' = 'TOTAL CHARGE VAL'
  'ME' = 'RESULT OF MISSIN'
  'PM' = 'TOTAL CHARGE CON'
  'PE' = 'TOTAL CHARGE CON'
  'PME' = 'TOTAL CHARGE CON'
;
VALUE $TPD1__F
  '99999' = 'NOT ASCERTAINED '
;
VALUE $TPPC__F
  '9999' = 'NOT ASCERTAINED '
;
VALUE $PREASOF
  '001' = 'VISIT, NOT OTHER'
  '002' = 'VISIT WITH LAB W'
  '003' = 'VISIT WITH RADIO'
  '004' = 'VISIT WITH DIAGN'
  '005' = 'VISIT WITH THERA'
  '006' = 'OUTPATIENT SURGE'
  '007' = 'ER VISIT        '
  '008' = 'CONSULT NOT OTHE'
  '009' = 'VISIT WITH PHYSI'
  '010' = 'INPATIENT STAY C'
  '011' = 'PSYCHIATRIC EVAL'
  '101' = 'REGISTERED NURSE'
  '102' = 'LICENSED PRACTIC'
  '103' = 'HOME HEALTH AIDE'
  '105' = 'HOMEMAKER       '
  '200' = 'THERAPIST, IMPUT'
  '201' = 'SOCIAL WORKER/ME'
  '202' = 'ROUTINE HOME CAR'
  '203' = 'TECHNICIAN/THERA'
  '204' = 'IV THERAPIST    '
  '205' = 'PHYSICIAN       '
  '206' = 'EQUIPMENT RENTAL'
  '207' = 'VOLUNTEER       '
  '208' = 'ATTENDANT       '
  '209' = 'CPA             '
  '210' = 'PHYSICAL THERAPI'
  '211' = 'SPEECH THERAPY/P'
  '212' = 'SUPPLIES/RX/LAB '
  '213' = 'CASE MANAGEMENT '
  '214' = 'HYDRATION THERAP'
  '215' = 'TPN THERAPY     '
  '216' = 'RESPITE CARE    '
  '217' = 'NURSING ON CALL '
  '218' = 'COUNSELOR       '
  '219' = 'NUTRITIONIST    '
  '220' = 'RESPIRATORY THER'
  '221' = 'CNA             '
  '222' = 'ANTIBIOTIC THERA'
  '223' = 'MEDICATION THERA'
  '224' = 'HOME INFUSION TH'
  '225' = 'COMBINED SERVICE'
  '226' = 'PROVIDER        '
  '227' = 'MAINTENANCE THER'
  '228' = 'INDUCTION THERAP'
  '229' = 'HOSPICE PER DIEM'
  '230' = 'ET              '
  '231' = 'PERSONAL CARE AI'
  '232' = 'OCCUPATIONAL THE'
  '233' = 'CLERICAL        '
  '234' = 'RD              '
  '235' = 'THERAPIST, NOT O'
  '236' = 'CAPD HOME SUPPOR'
  '991' = 'OTHER SPECIFIED '
  '999' = 'NOT ASCERTAINED '
;
VALUE $ZQTY__F
  '000' = 'QUANTITY NOT APP'
  '996' = '996 OR GREATER  '
  '999' = 'NOT ASCERTAINED '
;
VALUE $PTE_CHF
  '000000' = 'NOTHING         '
  '999999' = 'NOT ASCERTAINED '
;
VALUE $PEN_CAF
  '1' = 'CIRCLED         '
  '2' = 'NOT CIRCLED     '
  '9' = 'NOT ASCERTAINED '
;
VALUE $PEN_OFF
  '1' = 'REASON RECORDED '
;
     DATA SYSUT2 ; INFILE SYSUT1 END = EOF ;

 /*****************************************************************************/
 /*                                                                           */
 /*                   GENSAS run of 06/28/1994 at 14:51:06                    */
 /*                                                                           */
 /*****************************************************************************/

          INPUT CRDTYP     018-019  @;

          IF CRDTYP = 01 THEN
          DO ;
               LINK CRD01;
               OUTPUT;
          END ;
          ELSE
          DO ;
               PUT 'INVALID CRDTYP : ' CRDTYP  = ;
               INPUT ; /* Release input line */
          END ;

     RETURN;


FORMAT
PFORM    $PFORM_F.
PRECORD   PRECORF.
IEVENTFG $IEVENTF.
OWNSHP2  $OWNSHPF.
CARETYPE  CARETYF.
PRBEGMO   PRBEGMF.
PRBEGDY   PRBEGMF.
PRBEGYR   PRBEGMF.
PRENDMO   PRBEGMF.
PRENDDY   PRBEGMF.
PRENDYR   PRBEGMF.
NUMNIGHT $NUMNIGF.
FLG_ILS2 $FLG_ILF.
TPD1     $TPD1__F.
TPPC     $TPPC__F.
PREASON  $PREASOF.
PDRUGCD2 $TPPC__F.
IDRUGCD  $TPPC__F.
FLG_IDRG $FLG_ILF.
FLG_IDOS $FLG_ILF.
ZQTY     $ZQTY__F.
IQTY     $ZQTY__F.
FLG_IQTY $FLG_ILF.
PTE_CHRG $PTE_CHF.
PTE_ICHR $PTE_CHF.
FGT_ICHR $FLG_ILF.
PEC_RM   $PTE_CHF.
PEC_IRM  $PTE_CHF.
FGC_IRM  $FLG_ILF.
PEC_PHIV $PTE_CHF.
PEC_IPHI $PTE_CHF.
FGC_IPHI $FLG_ILF.
PEC_RAD  $PTE_CHF.
PEC_IRAD $PTE_CHF.
FGC_IRAD $FLG_ILF.
PEC_LAB  $PTE_CHF.
PEC_ILAB $PTE_CHF.
FGC_ILAB $FLG_IL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OFF.
PEN_IHMO $PEN_OFF.
FGN_IHMO $FLG_ILF.
PEN_RECH $PEN_OFF.
PEN_IREC $PEN_OFF.
FGN_IREC $FLG_ILF.
;
     LABEL

 /*****************************************************************************/
 /*                                                                           */
 /*                         Begin Labels for Card 01                          */
 /*                                                                           */
 /*****************************************************************************/

          PATID    = '~PATIENT ID NUMBER'
          ULT_PA   = '~PROVIDER ID'
          PFORM    = '~QUESTIONNAIRE FORM TYPE'
          PRECORD  = '~RECORD NUMBER'
          PSUBREC  = '~SUBRECORD NUMBER'
          IEVENTFG = '~WAS ENTIRE RECORD IMPUTED?'
          OWNSHP2  = '~HOSPITAL OWNERSHIP CODE'
          CARETYPE = '~TYPE OF CARE PROVIDED (DERIVED)\'
          PTE_EVNT = '~TOTAL VISITS FOR EVENT PERIOD'
          PRBEGMO  = '~BEGIN DATE - MONTH'
          PRBEGDY  = '~BEGIN DATE - DAY'
          PRBEGYR  = '~BEGIN DATE - YEAR'
          PRENDMO  = '~END DATE - MONTH'
          PRENDDY  = '~END DATE - DAY'
          PRENDYR  = '~END DATE - YEAR'
          NUMNIGHT = '~LENGTH OF STAY IN NIGHTS (DERIVED)'
          ILOS2    = '~IMPUTED LENGTH OF STAY'
          FLG_ILS2 = '~TYPE OF IMPUTATION - LENGTH OF STAY'
          PHSTAYFG = '~UNIQUE IDENTIFIER LINKING INPATIENT'
          TPD1     = '~PRINCIPAL DIAGNOSIS CODE'
          TPOD1    = '~OTHER DIAGNOSIS CODE - FIRST LISTED'
          TPOD2    = '~OTHER DIAGNOSIS CODE - SECOND LISTED'
          TPOD3    = '~OTHER DIAGNOSIS CODE - THIRD LISTED'
          TPOD4    = '~OTHER DIAGNOSIS CODE - FOURTH LISTED'
          TPOD5    = '~OTHER DIAGNOSIS CODE - FIFTH LISTED'
          TPPC     = '~PRINCIPAL PROCEDURE CODE'
          TPRO1    = '~OTHER PROCEDURE CODE - FIRST LISTED'
          TPRO2    = '~OTHER PROCEDURE CODE - SECOND LISTED'
          TPRO3    = '~OTHER PROCEDURE CODE - THIRD LISTED'
          PREASON  = '~REASON FOR VISIT'
          PDRUGCD2 = '~DRUG CODE'
          IDRUGCD  = '~DRUG CODE ORIGINAL/IMPUTED'
          FLG_IDRG = '~TYPE OF IMPUTATION - DRUG CODE'
          ZDOSE    = '~DRUG DOSAGE'
          IDOSE    = '~DRUG DOSAGE ORIGINAL/IMPUTED'
          FLG_IDOS = '~TYPE OF IMPUTATION - DRUG DOSAGE'
          ZQTY     = '~QUANTITY'
          IQTY     = '~QUANTITY ORIGINAL/IMPUTED'
          FLG_IQTY = '~TYPE OF IMPUTATION - QUANTY'
          PTE_CHRG = '~TOTAL AMOUNT CHARGED FOR EVENT'
          PTE_ICHR = '~TOTAL AMOUNT CHARGED FOR EVENT'
          FGT_ICHR = '~TYPE OF IMPUTATION IMPUTE FLAG - TOTAL'
          PEC_RM   = '~AMOUNT CHARGED - ROOM'
          PEC_IRM  = '~AMOUNT CHARGED ORIGINAL/IMPUTED - ROOM'
          FGC_IRM  = '~TYPE OF IMPUTATION IMPUTE FLAG - ROOM'
          PEC_PHIV = '~AMOUNT CHARGED - PHARMACY/IV SOLUTION'
          PEC_IPHI = '~AMOUNT CHARGED ORIGINAL/IMPUTED -'
          FGC_IPHI = '~TYPE OF IMPUTATION IMPUTE FLAG -'
          PEC_RAD  = '~AMOUNT CHARGED - RADIOLOGY'
          PEC_IRAD = '~AMOUNT CHARGED ORIGINAL/IMPUTED -'
          FGC_IRAD = '~TYPE OF IMPUTATION IMPUTE FLAG -'
          PEC_LAB  = '~AMOUNT CHARGED - LAB FEE'
          PEC_ILAB = '~AMOUNT CHARGED ORIGINAL/IMPUTED - LAB'
          FGC_ILAB = '~TYPE OF IMPUTATION IMPUTE FLAG - LAB'
          PEC_SPL  = '~AMOUNT CHARGED - MEDICAL/SURGICAL'
          PEC_ISPL = '~AMOUNT CHARGED ORIGINAL/IMPUTED -'
          FGC_ISPL = '~TYPE OF IMPUTATION IMPUTE FLAG -'
          PEC_PRF  = '~AMOUNT CHARGED - PROFESSIONAL FEE'
          PEC_IPRF = '~AMOUNT CHARGED ORIGINAL/IMPUTED -'
          FGC_IPRF = '~TYPE OF IMPUTATION IMPUTE FLAG -'
          PEC_ER   = '~AMOUNT CHARGED - EMERGENCY ROOM'
          PEC_IER  = '~AMOUNT CHARGED ORIGINAL/IMPUTED -'
          FGC_IER  = '~TYPE OF IMPUTATION IMPUTE FLAG -'
          PEC_OSA  = '~AMOUNT CHARGED - AGGREGATED OTHER NOT'
          PEC_IOSA = '~AMOUNT CHARGED ORIGINAL/IMPUTED -'
          FGC_IOSA = '~TYPE OF IMPUTATION IMPUTE FLAG -'
          PEC_RMO  = '~AMOUNT CHARGED - OPERATING/RECOVERY'
          PEC_IRMO = '~AMOUNT CHARGED ORIGINAL/IMPUTED -'
          FGC_IRMO = '~TYPE OF IMPUTATION IMPUTE FLAG -'
          PEC_SPLA = '~AMOUNT CHARGED - OTHER MEDICAL/SURGICAL'
          PEC_ISPA = '~AMOUNT CHARGED ORIGINAL/IMPUTED - OTHER'
          FGC_ISPA = '~TYPE OF IMPUTATION IMPUTE FLAG - OTHER'
          PEC_DIAG = '~AMOUNT CHARGED - DIAGNOSTIC TESTS'
          PEC_IDIA = '~AMOUNT CHARGED ORIGINAL/IMPUTED -'
          FGC_IDIA = '~TYPE OF IMPUTATION IMPUTE FLAG -'
          PEC_THRP = '~AMOUNT CHARGED - THERAPY'
          PEC_ITHR = '~AMOUNT CHARGED ORIGINAL/IMPUTED -'
          FGC_ITHR = '~TYPE OF IMPUTATION IMPUTE FLAG -'
          PEC_AUX  = '~AMOUNT CHARGED - AUXILIARY CHARGES'
          PEC_IAUX = '~AMOUNT CHARGED ORIGINAL/IMPUTED -'
          FGC_IAUX = '~TYPE OF IMPUTATION IMPUTE FLAG -'
          PEC_ICU  = '~AMOUNT CHARGED - INTENSIVE CARE UNIT'
          PEC_IICU = '~AMOUNT CHARGED ORIGINAL/IMPUTED -'
          FGC_IICU = '~TYPE OF IMPUTATION IMPUTE FLAG -'
          PEC_MISC = '~AMOUNT CHARGED - MISCELLANEOUS CHARGES'
          PEC_IMIS = '~AMOUNT CHARGED ORIGINAL/IMPUTED -'
          FGC_IMIS = '~TYPE OF IMPUTATION IMPUTE FLAG -'
          PEC_OTH  = '~AMOUNT CHARGED - OTHER UNIDENTIFIED'
          PEC_IOTH = '~AMOUNT CHARGED ORIGINAL/IMPUTED - OTHER'
          FGC_IOTH = '~TYPE OF IMPUTATION IMPUTE FLAG - OTHER'
          PEC_FLT  = '~AMOUNT CHARGED - FLAT FEE'
          PEC_IFLT = '~AMOUNT CHARGED ORIGINAL/IMPUTED - FLAT'
          FGC_IFLT = '~TYPE OF IMPUTATION IMPUTE FLAG - FLAT'
          PEC_MED  = '~AMOUNT CHARGED - MEDICATION (IMPUTED IN'
          PEC_IMED = '~AMOUNT CHARGED ORIGINAL/IMPUTED -'
          FGC_IMED = '~TYPE OF IMPUTATION IMPUTE FLAG -'
          PTE_PAY  = '~TOTAL AMOUNT PAID'
          PTE_IPAY = '~TOTAL AMOUNT PAID ORIGINAL/IMPUTED'
          FGT_IPAY = '~TYPE OF IMPUTATION - IMPUTE FLAG TOTAL'
          PEP_SELF = '~AMOUNT PAID - SELF'
          PEP_ISEL = '~AMOUNT PAID ORIGINAL/IMPUTED - SELF'
          FGP_ISEL = '~TYPE OF IMPUTATION - IMPUTE FLAG - SELF'
          PEP_MEDC = '~AMOUNT PAID - MEDICARE/MEDICAID'
          PEP_IMEC = '~AMOUNT PAID ORIGINAL/IMPUTED -'
          FGP_IMEC = '~TYPE OF IMPUTATION - IMPUTE FLAG -'
          PEP_PRVI = '~AMOUNT PAID - PRIVATE INSURANCE'
          PEP_IPRV = '~AMOUNT PAID ORIGINAL/IMPUTED - PRIVATE'
          FGP_IPRV = '~TYPE OF IMPUTATION - IMPUTE FLAG -'
          PEP_PPP  = '~AMOUNT PAID - PRE-PAID PLAN'
          PEP_IPPP = '~AMOUNT PAID ORIGINAL/IMPUTED - PRE-PAID'
          FGP_IPPP = '~TYPE OF IMPUTATION - IMPUTE FLAG -'
          PEP_COMM = '~AMOUNT PAID - COMMUNITY ORGANIZATIONS'
          PEP_ICOM = '~AMOUNT PAID ORIGINAL/IMPUTED -'
          FGP_ICOM = '~TYPE OF IMPUTATION - IMPUTE FLAG -'
          PEP_AGN  = '~AMOUNT PAID - AGENCY PLACEMENT'
          PEP_IAGN = '~AMOUNT PAID ORIGINAL/IMPUTED - AGENCY'
          FGP_IAGN = '~TYPE OF IMPUTATION - IMPUTE FLAG -'
          PEP_PUB  = '~AMOUNT PAID - OTHER PUBLIC'
          PEP_IPUB = '~AMOUNT PAID ORIGINAL/IMPUTED - OTHER'
          FGP_IPUB = '~TYPE OF IMPUTATION - IMPUTE FLAG -'
          PEP_DSAB = '~AMOUNT PAID - DISABILITY'
          PEP_IDSA = '~AMOUNT PAID ORIGINAL/IMPUTED -'
          FGP_IDSA = '~TYPE OF IMPUTATION - IMPUTE FLAG -'
          PEP_GRNT = '~AMOUNT PAID - FEDERAL GRANT'
          PEP_IGRN = '~AMOUNT PAID ORIGINAL/IMPUTED - FEDERAL'
          FGP_IGRN = '~TYPE OF IMPUTATION - IMPUTE FLAG -'
          PEP_PRTY = '~AMOUNT PAID - RESPONSIBLE PARTY'
          PEP_IPRT = '~AMOUNT PAID ORIGINAL/IMPUTED -'
          FGP_IPRT = '~TYPE OF IMPUTATION - IMPUTE FLAG -'
          PEP_OTH  = '~AMOUNT PAID - OTHER'
          PEP_IOTH = '~AMOUNT PAID ORIGINAL/IMPUTED - OTHER'
          FGP_IOTH = '~TYPE OF IMPUTATION - IMPUTE FLAG -'
          PTE_3RD  = '~AMOUNT PAID - THIRD PARTY - PHARMACY'
          PTE_I3RD = '~AMOUNT PAID ORIGINAL/IMPUTED - THIRD'
          FGT_I3RD = '~TYPE OF IMPUTATION - IMPUTE FLAG -'
          PTE_NPAY = '~AMOUNT NOT EXPECTED'
          PTE_INPA = '~AMOUNT NOT EXPECTED ORIGINAL/IMPUTED'
          FGT_INPA = '~TYPE OF IMPUTATION - IMPUTE FLAG -'
          PEN_CAID = '~REASON PAYMENTS NOT EXPECTED - MEDICAID'
          PEN_ICAI = '~REASON PAYMENTS NOT EXPECTED'
          FGN_ICAI = '~TYPE OF IMPUTATION - IMPUTE FLAG -'
          PEN_CARE = '~REASON PAYMENTS NOT EXPECTED - MEDICARE'
          PEN_ICAR = '~REASON PAYMENTS NOT EXPECTED'
          FGN_ICAR = '~TYPE OF IMPUTATION - IMPUTE FLAG -'
          PEN_PRVI = '~REASON PAYMENTS NOT EXPECTED - PRIVATE'
          PEN_IPRV = '~REASON PAYMENTS NOT EXPECTED'
          FGN_IPRV = '~TYPE OF IMPUTATION - IMPUTE FLAG -'
          PEN_PAT  = '~REASON PAYMENTS NOT EXPECTED -'
          PEN_IPAT = '~REASON PAYMENTS NOT EXPECTED'
          FGN_IPAT = '~TYPE OF IMPUTATION - IMPUTE FLAG -'
          PEN_RES  = '~REASON PAYMENTS NOT EXPECTED - RESEARCH'
          PEN_IRES = '~REASON PAYMENTS NOT EXPECTED'
          FGN_IRES = '~TYPE OF IMPUTATION - IMPUTE FLAG -'
          PEN_OFF  = '~REASON PAYMENTS NOT EXPECTED - WRITE'
          PEN_IOFF = '~REASON PAYMENTS NOT EXPECTED'
          FGN_IOFF = '~TYPE OF IMPUTATION - IMPUTE FLAG -'
          PEN_DSCN = '~REASON PAYMENTS NOT EXPECTED -'
          PEN_IDSC = '~REASON PAYMENTS NOT EXPECTED'
          FGN_IDSC = '~TYPE OF IMPUTATION - IMPUTE FLAG -'
          PEN_ADJ  = '~REASON PAYMENTS NOT EXPECTED -'
          PEN_IADJ = '~REASON PAYMENTS NOT EXPECTED'
          FGN_IADJ = '~TYPE OF IMPUTATION - IMPUTE FLAG -'
          PEN_ASSN = '~REASON PAYMENTS NOT EXPECTED -'
          PEN_IASS = '~REASON PAYMENTS NOT EXPECTED'
          FGN_IASS = '~TYPE OF IMPUTATION - IMPUTE FLAG -'
          PEN_DSAL = '~REASON PAYMENTS NOT EXPECTED -'
          PEN_IDSA = '~REASON PAYMENTS NOT EXPECTED'
          FGN_IDSA = '~TYPE OF IMPUTATION - IMPUTE FLAG -'
          PEN_HMO  = '~REASON PAYMENTS NOT EXPECTED - HMO CAP'
          PEN_IHMO = '~REASON PAYMENTS NOT EXPECTED'
          FGN_IHMO = '~TYPE OF IMPUTATION - IMPUTE FLAG - HMO'
          PEN_RECH = '~REASON PAYMENTS NOT EXPECTED - RECHARGE'
          PEN_IREC = '~REASON PAYMENTS NOT EXPECTED'
          FGN_IREC = '~TYPE OF IMPUTATION - IMPUTE FLAG -'
     ;
     RETURN;

 /*****************************************************************************/
 /*                                                                           */
 /*                        Input statement for Card 01                        */
 /*                                                                           */
 /*****************************************************************************/

     CRD01 :
     INPUT
               PATID              001-009
               ULT_PA             010-016
               PFORM        $     017
               PRECORD            018-019
               PSUBREC            020-022
               IEVENTFG     $     023
               OWNSHP2      $     024
               CARETYPE           025-026
               PTE_EVNT     $     027-029
               PRBEGMO            030-031
               PRBEGDY            032-033
               PRBEGYR            034-035
               PRENDMO            036-037
               PRENDDY            038-039
               PRENDYR            040-041
               NUMNIGHT     $     042-044
               ILOS2        $     045-047
               FLG_ILS2     $     048-050
               PHSTAYFG     $     051-054
               TPD1         $     055-059
               TPOD1        $     060-064
               TPOD2        $     065-069
               TPOD3        $     070-074
               TPOD4        $     075-079
               TPOD5        $     080-084
               TPPC         $     085-088
               TPRO1        $     089-092
               TPRO2        $     093-096
               TPRO3        $     097-100
               PREASON      $     101-103
               PDRUGCD2     $     104-107
               IDRUGCD      $     108-111
               FLG_IDRG     $     112-114
               ZDOSE        $     115-134
               IDOSE        $     135-154
               FLG_IDOS     $     155-157
               ZQTY         $     158-160
               IQTY         $     161-163
               FLG_IQTY     $     164-166
               PTE_CHRG     $     167-172
               PTE_ICHR     $     173-178
               FGT_ICHR     $     179-181
               PEC_RM       $     182-187
               PEC_IRM      $     188-193
               FGC_IRM      $     194-196
               PEC_PHIV     $     197-202
               PEC_IPHI     $     203-208
               FGC_IPHI     $     209-211
               PEC_RAD      $     212-217
               PEC_IRAD     $     218-223
               FGC_IRAD     $     224-226
               PEC_LAB      $     227-232
               PEC_ILAB     $     233-238
               FGC_ILAB     $     239-241
               PEC_SPL      $     242-247
               PEC_ISPL     $     248-253
               FGC_ISPL     $     254-256
               PEC_PRF      $     257-262
               PEC_IPRF     $     263-268
               FGC_IPRF     $     269-271
               PEC_ER       $     272-277
               PEC_IER      $     278-283
               FGC_IER      $     284-286
               PEC_OSA      $     287-292
               PEC_IOSA     $     293-298
               FGC_IOSA     $     299-301
               PEC_RMO      $     302-307
               PEC_IRMO     $     308-313
               FGC_IRMO     $     314-316
               PEC_SPLA     $     317-322
               PEC_ISPA     $     323-328
               FGC_ISPA     $     329-331
               PEC_DIAG     $     332-337
               PEC_IDIA     $     338-343
               FGC_IDIA     $     344-346
               PEC_THRP     $     347-352
               PEC_ITHR     $     353-358
               FGC_ITHR     $     359-361
               PEC_AUX      $     362-367
               PEC_IAUX     $     368-373
               FGC_IAUX     $     374-376
               PEC_ICU      $     377-382
               PEC_IICU     $     383-388
               FGC_IICU     $     389-391
               PEC_MISC     $     392-397
               PEC_IMIS     $     398-403
               FGC_IMIS     $     404-406
               PEC_OTH      $     407-412
               PEC_IOTH     $     413-418
               FGC_IOTH     $     419-421
               PEC_FLT      $     422-427
               PEC_IFLT     $     428-433
               FGC_IFLT     $     434-436
               PEC_MED      $     437-442
               PEC_IMED     $     443-448
               FGC_IMED     $     449-451
               PTE_PAY      $     452-457
               PTE_IPAY     $     458-463
               FGT_IPAY     $     464-466
               PEP_SELF     $     467-472
               PEP_ISEL     $     473-478
               FGP_ISEL     $     479-481
               PEP_MEDC     $     482-487
               PEP_IMEC     $     488-493
               FGP_IMEC     $     494-496
               PEP_PRVI     $     497-502
               PEP_IPRV     $     503-508
               FGP_IPRV     $     509-511
               PEP_PPP      $     512-517
               PEP_IPPP     $     518-523
               FGP_IPPP     $     524-526
               PEP_COMM     $     527-532
               PEP_ICOM     $     533-538
               FGP_ICOM     $     539-541
               PEP_AGN      $     542-547
               PEP_IAGN     $     548-553
               FGP_IAGN     $     554-556
               PEP_PUB      $     557-562
               PEP_IPUB     $     563-568
               FGP_IPUB     $     569-571
               PEP_DSAB     $     572-577
               PEP_IDSA     $     578-583
               FGP_IDSA     $     584-586
               PEP_GRNT     $     587-592
               PEP_IGRN     $     593-598
               FGP_IGRN     $     599-601
               PEP_PRTY     $     602-607
               PEP_IPRT     $     608-613
               FGP_IPRT     $     614-616
               PEP_OTH      $     617-622
               PEP_IOTH     $     623-628
               FGP_IOTH     $     629-631
               PTE_3RD      $     632-637
               PTE_I3RD     $     638-643
               FGT_I3RD     $     644-646
               PTE_NPAY     $     647-652
               PTE_INPA     $     653-658
               FGT_INPA     $     659-661
               PEN_CAID     $     662
               PEN_ICAI     $     663
               FGN_ICAI     $     664-666
               PEN_CARE     $     667
               PEN_ICAR     $     668
               FGN_ICAR     $     669-671
               PEN_PRVI     $     672
               PEN_IPRV     $     673
               FGN_IPRV     $     674-676
               PEN_PAT      $     677
               PEN_IPAT     $     678
               FGN_IPAT     $     679-681
               PEN_RES      $     682
               PEN_IRES     $     683
               FGN_IRES     $     684-686
               PEN_OFF      $     687
               PEN_IOFF     $     688
               FGN_IOFF     $     689-691
               PEN_DSCN     $     692
               PEN_IDSC     $     693
               FGN_IDSC     $     694-696
               PEN_ADJ      $     697
               PEN_IADJ     $     698
               FGN_IADJ     $     699-701
               PEN_ASSN     $     702
               PEN_IASS     $     703
               FGN_IASS     $     704-706
               PEN_DSAL     $     707
               PEN_IDSA     $     708
               FGN_IDSA     $     709-711
               PEN_HMO      $     712
               PEN_IHMO     $     713
               FGN_IHMO     $     714-716
               PEN_RECH     $     717
               PEN_IREC     $     718
               FGN_IREC     $     719-721
     ;
     RETURN;
     ;
     PROC FREQ ;  TABLES
          PATID
          ULT_PA
          PFORM
          PRECORD
          PSUBREC
          IEVENTFG
          OWNSHP2
          CARETYPE
          PTE_EVNT
          PRBEGMO
          PRBEGDY
          PRBEGYR
          PRENDMO
          PRENDDY
          PRENDYR
          NUMNIGHT
          ILOS2
          FLG_ILS2
          PHSTAYFG
          TPD1
          TPOD1
          TPOD2
          TPOD3
          TPOD4
          TPOD5
          TPPC
          TPRO1
          TPRO2
          TPRO3
          PREASON
          PDRUGCD2
          IDRUGCD
          FLG_IDRG
          ZDOSE
          IDOSE
          FLG_IDOS
          ZQTY
          IQTY
          FLG_IQTY
          PTE_CHRG
          PTE_ICHR
          FGT_ICHR
          PEC_RM
          PEC_IRM
          FGC_IRM
          PEC_PHIV
          PEC_IPHI
          FGC_IPHI
          PEC_RAD
          PEC_IRAD
          FGC_IRAD
          PEC_LAB
          PEC_ILAB
          FGC_ILAB
          PEC_SPL
          PEC_ISPL
          FGC_ISPL
          PEC_PRF
          PEC_IPRF
          FGC_IPRF
          PEC_ER
          PEC_IER
          FGC_IER
          PEC_OSA
          PEC_IOSA
          FGC_IOSA
          PEC_RMO
          PEC_IRMO
          FGC_IRMO
          PEC_SPLA
          PEC_ISPA
          FGC_ISPA
          PEC_DIAG
          PEC_IDIA
          FGC_IDIA
          PEC_THRP
          PEC_ITHR
          FGC_ITHR
          PEC_AUX
          PEC_IAUX
          FGC_IAUX
          PEC_ICU
          PEC_IICU
          FGC_IICU
          PEC_MISC
          PEC_IMIS
          FGC_IMIS
          PEC_OTH
          PEC_IOTH
          FGC_IOTH
          PEC_FLT
          PEC_IFLT
          FGC_IFLT
          PEC_MED
          PEC_IMED
          FGC_IMED
          PTE_PAY
          PTE_IPAY
          FGT_IPAY
          PEP_SELF
          PEP_ISEL
          FGP_ISEL
          PEP_MEDC
          PEP_IMEC
          FGP_IMEC
          PEP_PRVI
          PEP_IPRV
          FGP_IPRV
          PEP_PPP
          PEP_IPPP
          FGP_IPPP
          PEP_COMM
          PEP_ICOM
          FGP_ICOM
          PEP_AGN
          PEP_IAGN
          FGP_IAGN
          PEP_PUB
          PEP_IPUB
          FGP_IPUB
          PEP_DSAB
          PEP_IDSA
          FGP_IDSA
          PEP_GRNT
          PEP_IGRN
          FGP_IGRN
          PEP_PRTY
          PEP_IPRT
          FGP_IPRT
          PEP_OTH
          PEP_IOTH
          FGP_IOTH
          PTE_3RD
          PTE_I3RD
          FGT_I3RD
          PTE_NPAY
          PTE_INPA
          FGT_INPA
          PEN_CAID
          PEN_ICAI
          FGN_ICAI
          PEN_CARE
          PEN_ICAR
          FGN_ICAR
          PEN_PRVI
          PEN_IPRV
          FGN_IPRV
          PEN_PAT
          PEN_IPAT
          FGN_IPAT
          PEN_RES
          PEN_IRES
          FGN_IRES
          PEN_OFF
          PEN_IOFF
          FGN_IOFF
          PEN_DSCN
          PEN_IDSC
          FGN_IDSC
          PEN_ADJ
          PEN_IADJ
          FGN_IADJ
          PEN_ASSN
          PEN_IASS
          FGN_IASS
          PEN_DSAL
          PEN_IDSA
          FGN_IDSA
          PEN_HMO
          PEN_IHMO
          FGN_IHMO
          PEN_RECH
          PEN_IREC
          FGN_IREC
     ;