Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: DGV53PTI

DGV53PTI.m

Go to the documentation of this file.
DGV53PTI ;MAF/ALB - CONVERSION TO UPDATE PHYSICIAN FOR DEFICIENCY IN THE FILE 393 14TH PIECE - SEP 21, 1992
 ;;5.3;Registration;**1015**;Aug 13, 1993;Build 21
 ;PARAMETER CHECK
EN1 I '$D(^VAS(393,0)) D NOCON G Q
 S DGJTDV=0 F  S DGJTDV=$O(^DG(40.8,DGJTDV)) Q:DGJTDV']""!(+DGJTDV=0)  I $D(^DG(40.8,DGJTDV,0)) I $D(^DG(40.8,DGJTDV,"DT")) D LIST
 I $D(^UTILITY("VAS",$J)) W !,"***The following paramters need to be updated before the IRT conversion will run" D PRT,Q1
 I '$D(^UTILITY("VAS",$J)) W !!!,"***ALL IRT PARAMETERS ARE UPDATED, THE IRT CONVERSION WILL START!" D EN
Q K %,DIC,DIE,DR,DA,DGJTNODE,DGJTADM,DGJATT,DGJPRIM,DGJRES,DGJT,DGJTPAR,DGJTPHDE,DGJSTAT,DGJTDV,DGJDV,DGJDTN,DGJFSIG,DGJY,DGJMSG,DGPGM,IFN,POP,X,^UTILITY("VAS",$J)  Q
EN W !!,">POPULATING THE PHYSICIAN FOR DEFICIENCY FIELD FOR INCOMPLETE RECORDS TRACKING"
 W !!,">UPDATING ATTENDING PHYSICIAN IF FACILITY USES ATTENDING PHYSICIAN AS A DEFAULT"
 W !!,">>>IRT CONVERSION RUNNING"
 F IFN=0:0 S IFN=$O(^VAS(393,IFN)) Q:'IFN  I $D(^VAS(393,IFN,0)) S DGJTNODE=^VAS(393,IFN,0) D CK D FILE
 W !!,">>>IRT CONVERSION COMPLETE" Q
Q1 W !!!,">>>THIS IRT CONVERSION CAN NOT CONTINUE WITHOUT UPDATING THE PARAMETERS!!",!!
 W !,"PLEASE CONTACT YOUR MAS OFFICE AS TO HOW THE PARAMETERS SHOULD BE ANSWERED"
 W !,"***TO UPDATE THE PARAMETERS RUN THE OPTION 'DGYP IRT UPDATE PARM' ",!?50,"(Update IRT Paramters)"
 W !,"***THEN, RUN THE ROUTINE 'DGV53PTI' TO RUN THE IRT CONVERSION" Q
FILE Q:'$D(^VAS(393,IFN,0))
 I $D(DGJUATT) S DR=".1////"_DGJUATT
 S DIE="^VAS(393,",DA=IFN,DR=$S($D(DR):DR_";.14////"_DGJTPHDE,1:".14////"_DGJTPHDE) D ^DIE W:(IFN#5)=0 "." K DR,DGJUATT,DGJTPHDE Q
CK S DGJSTAT=$P(DGJTNODE,"^",11),DGJPRIM=$P(DGJTNODE,"^",9),DGJATT=$P(DGJTNODE,"^",10),DGJRES=$P(DGJTNODE,"^",12)
 S DGJDV=$P(DGJTNODE,"^",6),DGJTPAR=$S($D(^DG(40.8,+DGJDV,"DT")):^DG(40.8,+DGJDV,"DT"),1:"") D:DGJATT']"" LTS S DGJFSIG=$S($P(DGJTPAR,"^",10)="P":DGJPRIM,$P(DGJTPAR,"^",10)="A":DGJATT,1:"")
 S DGJDTN=$G(^VAS(393,IFN,"DT"))
 I DGJSTAT=$O(^DG(393.2,"B","SIGNED NO REVIEW",0)) D  S DGJTPHDE=X Q
 .S X=$S($P(DGJDTN,"^",6)]"":$P(DGJDTN,"^",6),1:"")
 I DGJSTAT=$O(^DG(393.2,"B","COMPLETED",0)) S DGJTPHDE=$S(DGJRES]"":DGJRES,1:DGJPRIM) Q
 I DGJSTAT=$O(^DG(393.2,"B","REVIEWED",0)) D  S DGJTPHDE=X Q
 .S X=$S($P(DGJDTN,"^",8)]"":$P(DGJDTN,"^",8),1:"")
 I DGJSTAT=$O(^DG(393.2,"B","DICTATED",0)) S DGJTPHDE=$S(DGJRES]"":DGJRES,1:DGJPRIM) Q
 I DGJSTAT=$O(^DG(393.2,"B","TRANSCRIBED",0)) S DGJTPHDE=DGJFSIG Q
 I DGJSTAT=$O(^DG(393.2,"B","INCOMPLETE",0)) S DGJTPHDE=$S(DGJRES]"":DGJRES,1:DGJPRIM) Q
 I DGJSTAT=$O(^DG(393.2,"B","SIGNED",0)) S DGJTPHDE=DGJATT
 I '$D(DGJTPHDE) S DGJTPHDE=""
 Q
LTS Q:$P(DGJTNODE,"^",4)']""
 Q:$P(DGJTPAR,"^",3)=0&($P(DGJTPAR,"^",10)="P")
 S DGJT=$P(DGJTNODE,"^",4),DGJT=$O(^DGPM("ATS",$P(DGJTNODE,"^",1),DGJT,0)),DGJT=$O(^(+DGJT,0)),DGJT=$O(^(+DGJT,0)),DGJT=$S($D(^DGPM(+DGJT,0)):^(0),1:"") ;last TS mvt
 I DGJATT']"" D  S (DGJATT,DGJUATT)=X
 .S DGJY=$S($P(DGJTPAR,"^",3)=1:4,$P(DGJTPAR,"^",3)=0:10,1:"") D DOC
 Q
DOC ;provider resp.
 S X=$P(DGJTPAR,"^",DGJY)
 S X=$S(X="A":$P(DGJT,"^",19),X="P":$P(DGJT,"^",8),1:"")
 Q
NOCON  W !!!,"***THIS SITE IS NOT USING THE IRT PACKAGE. THIS IRT CONVERSION NEED NOT BE RUN**",!! Q
LIST S X=^DG(40.8,+DGJTDV,"DT") I $P(X,"^",2)']"" S $P(^UTILITY("VAS",$J,$P(^DG(40.8,DGJTDV,0),"^",1)),"^",1)=100.02
 I $P(X,"^",3)']"" S $P(^UTILITY("VAS",$J,$P(^DG(40.8,DGJTDV,0),"^",1)),"^",2)=100.03
 I $P(X,"^",3)=1,$P(X,"^",4)']"" S $P(^UTILITY("VAS",$J,$P(^DG(40.8,DGJTDV,0),"^",1)),"^",3)=100.04
 I $P(X,"^",10)']"" S $P(^UTILITY("VAS",$J,$P(^DG(40.8,DGJTDV,0),"^",1)),"^",4)=100.1
 Q
PRT S DGJTDV=0 F  S DGJTDV=$O(^UTILITY("VAS",$J,DGJTDV)) Q:DGJTDV']""  I $D(^UTILITY("VAS",$J,DGJTDV)) S DGJTNODE=^UTILITY("VAS",$J,DGJTDV) D WRITE
 Q
WRITE W !!,"DIVISION: "_DGJTDV
 I $P(DGJTNODE,"^",1)]"" W !?5,$P(^DD(40.8,$P(DGJTNODE,"^",1),0),"^",1),?32,"     Choices: Primary or Attending Physician"
 I $P(DGJTNODE,"^",2)]"" W !?5,$P(^DD(40.8,$P(DGJTNODE,"^",2),0),"^",1),?34,"   Choices: Yes or No",!?10,"If 'YES' the parameter DEFAULT REVIEWING PHYSICIAN will also be asked",!?32,"     Choices: Primary or Attending Physician"
 I $P(DGJTNODE,"^",3)]"" W !?5,$P(^DD(40.8,$P(DGJTNODE,"^",3),0),"^",1),?32,"     Choices: Primary or Attending Physician"
 I $P(DGJTNODE,"^",4)]"" W !?5,$P(^DD(40.8,$P(DGJTNODE,"^",4),0),"^",1),"     Choices: Primary or Attending Physician"
 Q
MSG W !!!,"***PLEASE CONTACT YOUR MAS OFFICE IF YOU HAVE ANY QUESTIONS AS TO HOW THE",!,"IRT PARAMETERS SHOULD BE ANSWERED!"
 Q