Programme de construction de la nomenclature des "Groupes de
déficiences exclusifs" (langage SAS)
/*************************************************/
/* Calcul des Groupes de déficiences exclusifs */
/* à partir du fichier HID en domicile ordinaire */
/*************************************************/
/* Remarque : pour un travail sur le fichier en */
/* institution, il faudra adapter ce programme */
/* au questionnement qui est différent */
/*********************************************** */
data men; set hid99.moda (keep=ident numind anatd) ;
by ident numind ;
retain defmot defvis defaud deflan defime defvim defaut;
if first.ident or first.numind then do ;
defmot='0' ;
defvis='0' ;
defaud='0' ;
deflan='0' ;
defvim='0' ;
defime='0' ;
defaut='0' ;
end ;
if substr(anatd,1,1)='1' then defmot='1' ;
else if substr(anatd,1,1)='2' then defvis='1' ;
else if substr(anatd,1,1)='3' then defaud='1' ;
else if substr(anatd,1,1)='4' then deflan='1' ;
else if substr(anatd,1,1)='5' then defvim='1' ;
else if substr(anatd,1,1)='6' then defime='1' ;
else if substr(anatd,1,1)='7' then defaut='1' ;
if last.ident or last.numind then output ;
data men1 ; merge men hid99.mindiv_c (keep=ident numind ahandi age sexe traged poidscor) ;
by ident numind ;
if ahandi ne ' ';
if defmot=' ' then defmot='0' ;
if defvis=' ' then defvis='0' ;
if defaud=' ' then defaud='0' ;
if deflan=' ' then deflan='0' ;
if defime=' ' then defime='0' ;
if defvim=' ' then defvim='0' ;
if defaut=' ' then defaut='0' ;
defcom=defmot!!defvis!!defaud!!deflan!!defvim!!defime!!defaut ;
defcom6=substr(defcom,1,6);
if defcom6 in ('000001','000101') then jpdfex='01intmen';
else if defcom6 in ('100000','100100') then jpdfex='02motric';
else if defcom6 in ('010000','010100','001000','001100',
'000010','000110','000100') then jpdfex='03autphy';
else if substr(defcom6,1,1)='1' and substr(defcom6,6,1)='1' then jpdfex='04motime';
else if substr(defcom,6,1)='1' then jpdfex='05phyime';
else if defcom6 in ('100010','100110',
'110000','110100','101000','101100',
'111000','111100','110010','110110','101010','101110',
'111010','111110',
'010010','010110','001010','001110',
'011010','011110','011000','011100')
and substr(defcom,1,1)='1' then jpdfex='06motphy';
else if defcom6 in ('100010','100110',
'110000','110100','101000','101100',
'111000','111100','110010','110110','101010','101110',
'111010','111110',
'010010','010110','001010','001110',
'011010','011110','011000','011100') then jpdfex='07smtphy';
else if substr(defcom,7,1)='1' then jpdfex='08nonpre';
else if defcom6='000000' then jpdfex='09pasdef'; run ;
