/* SHORT TITLE:  Patient Quest-Med Practitioner, T1-T6   */
PROC FORMAT
;
VALUE  REC___F
   01  = 'NUMBER          '
;
VALUE $SFORM_F
  'A' = 'TIME 1 ADULT QUE'
  'B' = 'TIME 2 ADULT QUE'
  'C' = 'TIME 3 ADULT QUE'
  'G' = 'TIME 4 ADULT QUE'
  'H' = 'TIME 5 ADULT QUE'
  'I' = 'TIME 6 ADULT QUE'
  'D' = 'TIME 1 PEDIATRIC'
  'E' = 'TIME 2 PEDIATRIC'
  'F' = 'TIME 3 PEDIATRIC'
  'J' = 'TIME 4 PEDIATRIC'
  'K' = 'TIME 5 PEDIATRIC'
  'L' = 'TIME 6 PEDIATRIC'
;
VALUE $SFPARTF
  'F2' = 'MEDICAL PRACTITI'
;
VALUE $PROVIDF
  '9999997' = 'REFUSED         '
  '9999998' = 'DK              '
  '9999999' = 'NOT ASCERTAINED '
;
VALUE $SREASOF
  '21' = 'OPTOMETRIST     '
  '22' = 'FOOT DOCTOR     '
  '23' = 'CHIROPRACTOR    '
  '24' = 'OPHTHALMOLOGIST '
  '25' = 'BACK DOCTOR     '
  '26' = 'SKIN DISEASE/DER'
  '27' = 'MD/GENERAL PRACT'
  '28' = 'EAR NOSE AND THR'
  '29' = 'LAB WORK        '
  '30' = 'PHYSICAL THERAPI'
  '31' = 'MASSAGE         '
  '32' = 'ORTHOPEDIC      '
  '33' = 'HEARING SPECIALI'
  '91' = 'OTHER SPECIFIED '
  '97' = 'REFUSED         '
  '98' = 'DK              '
  '99' = 'NOT ASCERTAINED '
;
VALUE $SRE_EVF
  '000096' = '96 OR MORE      '
  '000097' = 'REFUSED         '
  '000098' = 'DK              '
  '000099' = 'NOT ASCERTAINED '
;
VALUE $SRE_DOF
  '000000' = 'NOTHING         '
  '999997' = 'REFUSED         '
  '999998' = 'DK              '
  '999999' = 'NOT ASCERTAINED '
;
VALUE $SRE_UCF
  '1' = 'PER VISIT       '
  '2' = 'TOTAL           '
  '3' = 'PERCENTAGE      '
  '4' = 'MONTHLY         '
  '5' = 'WEEKLY          '
  '7' = 'REFUSED         '
  '8' = 'DK              '
  '9' = 'NOT ASCERTAINED '
;
VALUE $SMELSPF
  '1' = 'YES             '
  '2' = 'NO              '
  '7' = 'REFUSED         '
  '8' = 'DK              '
  '9' = 'NOT ASCERTAINED '
;
VALUE $SRE_CAF
  '1' = 'CIRCLED         '
  '2' = 'NOT CIRCLED     '
  '7' = 'REFUSED         '
  '8' = 'DK              '
  '9' = 'NOT ASCERTAINED '
;
VALUE $SRE_EOF
  '01' = 'RESEARCH STUDY  '
  '03' = 'FLAT FEE        '
  '05' = 'GAY AIDS TASK FO'
  '14' = 'FAMILY/FRIEND   '
  '29' = 'COMMUNITY HEALTH'
  '46' = 'PROVIDER        '
  '47' = 'PRIVATE CHARITY '
  '50' = 'DRUG COMPANY    '
  '91' = 'OTHER SPECIFIED '
  '97' = 'REFUSED         '
  '98' = 'DK              '
  '99' = 'NOT ASCERTAINED '
;
VALUE $SRE_NOF
  '01' = 'FREE FROM PROVID'
  '02' = 'PAID IN FULL    '
  '03' = 'CAN''T AFFORD TO'
  '05' = 'RESEARCH STUDY  '
  '06' = 'GOVT AGENCY/GOVT'
  '18' = 'INCLUDED IN OTHE'
  '91' = 'OTHER SPECIFIED '
  '97' = 'REFUSED         '
  '98' = 'DK              '
  '99' = 'NOT ASCERTAINED '
;
VALUE $INSURFF
  '1' = 'SOP DISCREPANT W'
;
     DATA SYSUT2 ; INFILE SYSUT1 END = EOF ;

 /*****************************************************************************/
 /*                                                                           */
 /*                   GENSAS run of 06/27/1994 at 22:37:17                    */
 /*                                                                           */
 /*****************************************************************************/


          INPUT CRDTYP     010-011  @;

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

     RETURN;


FORMAT
REC       REC___F.
SFORM    $SFORM_F.
SFPART   $SFPARTF.
PROVID   $PROVIDF.
SREASON1 $SREASOF.
SRE_EVNT $SRE_EVF.
SRE_DOL  $SRE_DOF.
SRE_UC   $SRE_UCF.
SMELSPY  $SMELSPF.
SRE_CAID $SRE_CAF.
SRE_PUB  $SRE_CAF.
SRE_PRVI $SRE_CAF.
SRE_CARE $SRE_CAF.
SRE_OTHR $SRE_CAF.
SRE_EOS  $SRE_EOF.
SRE_NOPY $SRE_NOF.
INSURFLG $INSURFF.
;
     LABEL

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

          PATID    = '~PATIENT ID'
          REC      = '~RECORD NUMBER'
          SSUBREC  = '~SUBRECORD NUMBER'
          SFORM    = '~QUESTIONNAIRE TYPE'
          SFPART   = '~QUESTIONNAIRE QUESTION'
          PROVID   = '~PLEASE TELL ME THE NAME, ADDRESS AND'
          SRBEGMO  = '~ALWAYS BLANK'
          SRBEGDY  = '~ALWAYS BLANK'
          SRBEGYR  = '~ALWAYS BLANK'
          SRENDMO  = '~ALWAYS BLANK'
          SRENDDY  = '~ALWAYS BLANK'
          SRENDYR  = '~ALWAYS BLANK'
          HSPNIT   = '~ALWAYS BLANK'
          SREASON1 = '~WHAT KIND OF (SERVICE DID YOU'
          SREASON2 = '~ALWAYS BLANK'
          SREASON3 = '~ALWAYS BLANK'
          SREASON4 = '~ALWAYS BLANK'
          CONCD1   = '~ALWAYS BLANK'
          CONCD2   = '~ALWAYS BLANK'
          PROCCD1  = '~ALWAYS BLANK'
          PROCCD2  = '~ALWAYS BLANK'
          SHH_MED  = '~ALWAYS BLANK'
          SHH_PER  = '~ALWAYS BLANK'
          SHH_HOUS = '~ALWAYS BLANK'
          SHH_COUN = '~ALWAYS BLANK'
          SHH_MEAL = '~ALWAYS BLANK'
          SHH_OTH  = '~ALWAYS BLANK'
          OSCODE   = '~ALWAYS BLANK'
          SDRUGCD  = '~ALWAYS BLANK'
          SRE_EVNT = '~YOU TOLD ME YOU WENT TO (MEDICAL'
          HRDYWK   = '~ALWAYS BLANK'
          SRE_DOL  = '~HOW MUCH DID YOU OR WILL YOU PAY FOR'
          SRE_UC   = '~WAS THIS PER VISIT OR THE TOTAL FOR ALL'
          SMELSPY  = '~DID OR WILL SOMEONE ELSE PAY (AN'
          SRE_CAID = '~MEDICAID'
          SRE_PUB  = '~OTHER PUBLIC ASSISTANCE'
          SRE_PRVI = '~PRIVATE INSURANCE'
          SRE_CARE = '~MEDICARE'
          SRE_RES  = '~ALWAYS BLANK'
          SRE_OTHR = '~OTHER SPECIFIED'
          SRE_EOS  = '~OTHER SPECIFIED'
          SRE_NOPY = '~WHY WAS THERE NO (ADDITIONAL) PAYMENT?'
          SBPS     = '~ALWAYS BLANK'
          SHSTAYFG = '~ALWAYS BLANK'
          ICTMFLG  = '~ALWAYS BLANK'
          ANOSTYF1 = '~ALWAYS BLANK'
          ANOSTYF2 = '~ALWAYS BLANK'
          AGE      = '~ALWAYS BLANK'
          EMPYD    = '~ALWAYS BLANK'
          HRSEPM   = '~ALWAYS BLANK'
          RELAT    = '~ALWAYS BLANK'
          INSURFLG = '~SOURCE OF PAYMENT FOR EVENT DISCREPANT'
     ;
     RETURN;

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

     CRD01 :
     INPUT
               PATID              001-009
               REC                010-011
               SSUBREC            012-013
               SFORM        $     014
               SFPART       $     015-016
               PROVID       $     017-023
               SRBEGMO            024-025
               SRBEGDY            026-027
               SRBEGYR            028-029
               SRENDMO            030-031
               SRENDDY            032-033
               SRENDYR            034-035
               HSPNIT       $     036-038
               SREASON1     $     039-040
               SREASON2     $     041-042
               SREASON3     $     043-044
               SREASON4     $     045-046
               CONCD1       $     047-051
               CONCD2       $     052-056
               PROCCD1      $     057-061
               PROCCD2      $     062-066
               SHH_MED      $     067
               SHH_PER      $     068
               SHH_HOUS     $     069
               SHH_COUN     $     070
               SHH_MEAL     $     071
               SHH_OTH      $     072
               OSCODE       $     073-074
               SDRUGCD      $     075-078
               SRE_EVNT     $     079-084
               HRDYWK       $     085-087
               SRE_DOL      $     088-093
               SRE_UC       $     094
               SMELSPY      $     095
               SRE_CAID     $     096
               SRE_PUB      $     097
               SRE_PRVI     $     098
               SRE_CARE     $     099
               SRE_RES      $     100
               SRE_OTHR     $     101
               SRE_EOS      $     102-103
               SRE_NOPY     $     104-105
               SBPS         $     106
               SHSTAYFG     $     107-110
               ICTMFLG      $     111-116
               ANOSTYF1     $     117-120
               ANOSTYF2     $     121-124
               AGE          $     125-126
               EMPYD        $     127
               HRSEPM       $     128-130
               RELAT        $     131-132
               INSURFLG     $     133
     ;
     RETURN;
     ;
     PROC FREQ ;  TABLES
          PATID
          REC
          SSUBREC
          SFORM
          SFPART
          PROVID
          SRBEGMO
          SRBEGDY
          SRBEGYR
          SRENDMO
          SRENDDY
          SRENDYR
          HSPNIT
          SREASON1
          SREASON2
          SREASON3
          SREASON4
          CONCD1
          CONCD2
          PROCCD1
          PROCCD2
          SHH_MED
          SHH_PER
          SHH_HOUS
          SHH_COUN
          SHH_MEAL
          SHH_OTH
          OSCODE
          SDRUGCD
          SRE_EVNT
          HRDYWK
          SRE_DOL
          SRE_UC
          SMELSPY
          SRE_CAID
          SRE_PUB
          SRE_PRVI
          SRE_CARE
          SRE_RES
          SRE_OTHR
          SRE_EOS
          SRE_NOPY
          SBPS
          SHSTAYFG
          ICTMFLG
          ANOSTYF1
          ANOSTYF2
          AGE
          EMPYD
          HRSEPM
          RELAT
          INSURFLG
     ;