DVBAB70 ;ALB/SPH - CAPRI C&P EXAM INQUIRY ;09/28/2009
 ;;2.7;AMIE;**35,42,57,136,143,149**;Apr 10, 1995;Build 16
 ;Per VHA Directive 2004-038, this routine should not be modified.
 ;
STRT(ZMSG,DFN,ZREQDA) ;
 
DVBABCNT,REQDA,DA,X,Y,PNAM,NAME,DOB,SSN,CNUM,ADR1,ADR2,ADR3,CITY,STATE
 
HOMPHON,BUSPHON,OTHDIS,OTHDIS1,OTHDIS2,COUNTY,PROVINCE,POSTALCD,COUNTRY
 
ZIP,CANDT,PRBY,RELBY,DX,DXCOD,DXNUM,JII,PCT,SC,EDTA,EOD,RAD,LINE
 
REQN,REQDT,RONAME,STAT,XSTAT
 
DVBABCNT=0
 
^TMP($J)
 
(DA,DA(1),REQDA)=+ZREQDA
 
(NAME,SSN,CNUM,ADR1,ADR2,ADR3,CITY,STATE,ZIP,HOMPHON,BUSPHON,OTHDIS)=""
 
(COUNTY,PROVINCE,POSTALCD,COUNTRY)=""
 
VARS^DVBCUTIL
START ;
 
ZMSG(DVBABCNT)="                     COMPENSATION AND PENSION EXAM INQUIRY",DVBABCNT=DVBABCNT+1
 
ZMSG(DVBABCNT)="                     -------------------------------------",DVBABCNT=DVBABCNT+1
 
ZMSG(DVBABCNT)="",DVBABCNT=DVBABCNT+1
 
ZMSG(DVBABCNT)="",DVBABCNT=DVBABCNT+1
 
ZMSG(DVBABCNT)="                     Name: "_PNAM,DVBABCNT=DVBABCNT+1
 
ZMSG(DVBABCNT)="                      SSN: "_SSN,DVBABCNT=DVBABCNT+1
 
ZMSG(DVBABCNT)="                 C-Number: "_CNUM,DVBABCNT=DVBABCNT+1
 
Y=DOB ^DD("DD")
 
ZMSG(DVBABCNT)="                      DOB: "_Y,DVBABCNT=DVBABCNT+1
 
ZMSG(DVBABCNT)="                  Address: "_ADR1,DVBABCNT=DVBABCNT+1
 
ADR2'="" ZMSG(DVBABCNT)="                           "_ADR2,DVBABCNT=DVBABCNT+1
 
ADR3'="" ZMSG(DVBABCNT)="                           "_ADR3,DVBABCNT=DVBABCNT+1
 
I $$ISFORGN^DVBCUTIL(COUNTRY)>0 D
 
ZMSG(DVBABCNT)="City,Province,Postal Code: "_CITY_", "_PROVINCE_" "_POSTALCD
 
DVBABCNT=DVBABCNT+1
 
E  D
 
ZMSG(DVBABCNT)="         City,State,Zip+4: "_CITY_", "_STATE_" "_ZIP
 
DVBABCNT=DVBABCNT+1
 
COUNTRY>0 D
 
ZMSG(DVBABCNT)="                  Country: "_$$GETCNTRY^DVBCUTIL(COUNTRY)
 . 
DVBABCNT=DVBABCNT+1
 
ZMSG(DVBABCNT)="                Res Phone: "_HOMPHON,DVBABCNT=DVBABCNT+1
 
ZMSG(DVBABCNT)="                Bus Phone: "_BUSPHON,DVBABCNT=DVBABCNT+1
 
Y=EOD ^DD("DD"S:Y="" Y="Not specified"
 
ZMSG(DVBABCNT)="   Entered active service: "_Y,DVBABCNT=DVBABCNT+1
 
Y=RAD ^DD("DD"S:Y="" Y="Not specified"
 
ZMSG(DVBABCNT)="  Released active service: "_Y,DVBABCNT=DVBABCNT+1
 
ZMSG(DVBABCNT)="================================================================================",DVBABCNT=DVBABCNT+1
 
^DVBAB97,^DVBAB68
 
REQDT=$P(^DVB(396.3,REQDA,0),U,2)
 
Y=REQDT ^DD("DD")
 
ZMSG(DVBABCNT)="This request was initiated on "_$P(Y,"@",1)_" at "_$P(Y,"@",2),DVBABCNT=DVBABCNT+1
 
ZMSG(DVBABCNT)="Requester: "_REQN,DVBABCNT=DVBABCNT+1
 
ZMSG(DVBABCNT)="Requesting Regional Office: "_RONAME,DVBABCNT=DVBABCNT+1
 
ZMSG(DVBABCNT)="VHA Division Processing Request: "_$P($$SITE^VASITE(,$P(^DVB(396.3,REQDA,1),U,4)),U,2),DVBABCNT=DVBABCNT+1
 
ZMSG(DVBABCNT)="",DVBABCNT=DVBABCNT+1
 
I $D(^DVB(396.4,"C",REQDA)) ZMSG(DVBABCNT)="Exams on this request: ",DVBABCNT=DVBABCNT+1 TST^DVBAB96
 
'$D(^DVB(396.4,"C",REQDA)) ZMSG(DVBABCNT)="(No exams have yet been entered)",DVBABCNT=DVBABCNT+1
 
ZMSG(DVBABCNT)="",DVBABCNT=DVBABCNT+1
 
ZMSG(DVBABCNT)="** Status of request: ",DVBABCNT=DVBABCNT+1
 
(XSTAT,STAT)=$P(^DVB(396.3,REQDA,0),U,18)
 
STAT=$S(XSTAT="N":"New",XSTAT="P":"Pending, reported to MAS",XSTAT="T":"Transcribed",XSTAT="S":"Scheduled",XSTAT="R":"Released, not printed",XSTAT="C":"Completed",XSTAT="CT":"Completed, transferred out",XSTAT="NT":"New, transferred in",1:"")
 
STAT]"" ZMSG(DVBABCNT)=STAT,DVBABCNT=DVBABCNT+1
 
XSTAT="R"!(XSTAT="C"Y=$P(^DVB(396.3,REQDA,0),U,14) ^DD("DD"RELBY=$P(^DVB(396.3,REQDA,0),U,15),RELBY=$S($D(^VA(200,+RELBY,0)):$P(^(0),U,1),1:"Unknown user"ZMSG(DVBABCNT)="Released on "_Y_" by "_RELBY,DVBABCNT=DVBABCNT+1
 
XSTAT="C" Y=$P(^DVB(396.3,REQDA,0),U,16) ^DD("DD"PRBY=$P(^DVB(396.3,REQDA,0),U,17),PRBY=$S($D(^VA(200,+PRBY,0)):$P(^(0),U,1),1:"Unknown user"ZMSG(DVBABCNT)="Printed by the RO on "_Y_" by "_PRBY,DVBABCNT=DVBABCNT+1
 
STAT="" STAT=$S(XSTAT="X":"Cancelled by MAS",XSTAT="RX":"Cancelled by RO",1:"Unknown"ZMSG(DVBABCNT)=STAT,DVBABCNT=DVBABCNT+1
 
STAT["Cancelled" CANDT=$P(^DVB(396.3,REQDA,0),U,19) ZMSG(DVBABCNT)="  (Cancelled on "_$$FMTE^XLFDT(CANDT,"5DZ")_")",DVBABCNT=DVBABCNT+1
 
I $D(^DVB(396.3,REQDA,1)),$P(^(1),U,3)="Y" ZMSG(DVBABCNT)="This request was faxed to the regional office.",DVBABCNT=DVBABCNT+1
 
FEXAM=$P(^DVB(396.3,REQDA,0),U,9) FEXAM="Y" ZMSG(DVBABCNT)="*** Exams done on a FEE BASIS ***  ",DVBABCNT=DVBABCNT+1 FEXAM
 
ZMSG(DVBABCNT)="--------------------------------------------------------------------------------",DVBABCNT=DVBABCNT+1
 
DDIS
 
ZMSG(DVBABCNT)="Other Disabilities: "_OTHDIS,DVBABCNT=DVBABCNT+1 I $D(^DVB(396.3,REQDA,1)) ZMSG(DVBABCNT)="                    "_OTHDIS1,DVBABCNT=DVBABCNT+1 ZMSG(DVBABCNT)="                    "_OTHDIS2,DVBABCNT=DVBABCNT+1
 
ZMSG(DVBABCNT)="General Remarks:",DVBABCNT=DVBABCNT+1
 
LINE=0:0 LINE=$O(^DVB(396.3,REQDA,2,LINE)) Q:LINE=""  ZMSG(DVBABCNT)=^(LINE,0),DVBABCNT=DVBABCNT+1
END ^TMP($J),TSTA1,TSTAT,XCNP
 
Q
DDIS1 ZMSG(DVBABCNT)=DX_"  "_$J(PCT,3,0)_" %",DVBABCNT=DVBABCNT+1
 
ZMSG(DVBABCNT)="    Service-Connected? "_$S(SC=1:"Yes",1:"No")_"  DX Code: "_DXCOD,DVBABCNT=DVBABCNT+1
 
Q
DDIS ;
 
'$D(^DPT(DFN,.372)) ZMSG(DVBABCNT)="No rated disabilities on file",DVBABCNT=DVBABCNT+1 Q
 S 
ZMSG(DVBABCNT)="",DVBABCNT=DVBABCNT+1
 
ZMSG(DVBABCNT)="RATED DISABILITIES:",DVBABCNT=DVBABCNT+1
 
JII=0:0 JII=$O(^DPT(DFN,.372,JII)) Q:JII=""  DXNUM=$P(^DPT(DFN,.372,JII,0),U,1),PCT=$P(^(0),U,2),SC=$P(^(0),U,3),DX=$S($D(^DIC(31,DXNUM)):$P(^(DXNUM,0),U,1),1:"Unknown"),DXCOD=$S($D(^DIC(31,DXNUM)):$P(^(DXNUM,0),U,3),1:"Unknown"DDIS1
 
ZMSG(DVBABCNT)="",DVBABCNT=DVBABCNT+1
 
Q