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

PX157PST.m

Go to the documentation of this file.
  1. PX157PST ;ALB/SCK - PX*1.0*157 POST INIT INSTALL
  1. ;;1.0;PCE PATIENT CARE ENCOUNTER;**157**;Aug 12, 1996
  1. ;
  1. EN ; Edit Education Topics VA-ADVANCE DIRECTIVES & VA-ADVANCED DIRECTIVES SCREENING
  1. ; -- modifying to "advance directives" terminology.
  1. EN1 ;check VA-ADVANCED DIRECTIVES SCREENING
  1. S FIX1=0,FIX2=0,IEN1=0,U="^",WD1="VA-ADVANCED DIRECTIVES SCREENING",WD2="Advanced Directive Screening"
  1. S WD1N="VA-ADVANCE DIRECTIVES SCREENING",WD2N="Advance Directives Screening"
  1. S WD(1)="determine if the patient should receive Advanced Directive education. "
  1. S WDN(1)="determine if the patient should receive Advance Directives education."
  1. S WD(2)="Advanced Directive education. "
  1. S WDN(2)="Advance Directives education."
  1. S IEN1=$O(^AUTTEDT("B",WD1,IEN1)) I IEN1="" G EN2
  1. S REDT=^AUTTEDT(IEN1,0)
  1. I $P(REDT,U)'=WD1!($P(REDT,U,4)'=WD2) G EN2
  1. ;I ^AUTTEDT(IEN1,11,2,0)'=WD(1) G EN2
  1. ;I ^AUTTEDT(IEN1,12,4,0)'=WD(2) G EN2
  1. SET1 ;SET CORRECT WORDING
  1. S FIX1=1
  1. S DA=IEN1,DR=".01////^S X=WD1N",DIE="^AUTTEDT(" D ^DIE
  1. S DA=IEN1,DR=".04////^S X=WD2N",DIE="^AUTTEDT(" D ^DIE
  1. S ^AUTTEDT(IEN1,11,2,0)=WDN(1),^AUTTEDT(IEN1,12,4,0)=WDN(2)
  1. EN2 ;check VA-ADVANCED DIRECTIVES
  1. S IEN2=0,WD1A="VA-ADVANCED DIRECTIVES",WD2A="Advanced Directives"
  1. S WD1AN="VA-ADVANCE DIRECTIVES",WD2AN="Advance Directives"
  1. S WDA(1)="The patient and family will identify the implications of advanced"
  1. S WDA(2)="1. Explain what an advanced directive is."
  1. S WDA(3)="2. Explain the difference between advanced directives and a living will."
  1. S WDA(4)="5. Identify a social worker to contact for furthur information as appropriate."
  1. S WDAN(1)="The patient and family will identify the implications of advance"
  1. S WDAN(2)="1. Explain what an advance directives is."
  1. S WDAN(3)="2. Explain the difference between advance directives and a living will."
  1. S WDAN(4)="5. Identify a social worker to contact for further information as appropriate."
  1. S IEN2=$O(^AUTTEDT("B",WD1A,IEN2)) I IEN2="" G EN3
  1. S REDT=^AUTTEDT(IEN2,0)
  1. I $P(REDT,U)'=WD1A!($P(REDT,U,4)'=WD2A) G EN3
  1. I ^AUTTEDT(IEN2,11,1,0)'=WDA(1) G EN3
  1. I ^AUTTEDT(IEN2,12,1,0)'=WDA(2) G EN3
  1. I ^AUTTEDT(IEN2,12,3,0)'=WDA(3) G EN3
  1. I ^AUTTEDT(IEN2,12,10,0)'=WDA(4) G EN3
  1. SET2 ;SET CORRECT WORDING
  1. S FIX2=1
  1. S DA=IEN2,DR=".01////^S X=WD1AN",DIE="^AUTTEDT(" D ^DIE
  1. S DA=IEN2,DR=".04////^S X=WD2AN",DIE="^AUTTEDT(" D ^DIE
  1. S ^AUTTEDT(IEN2,11,1,0)=WDAN(1)
  1. S ^AUTTEDT(IEN2,12,1,0)=WDAN(2),^AUTTEDT(IEN2,12,3,0)=WDAN(3)
  1. S ^AUTTEDT(IEN2,12,10,0)=WDAN(4)
  1. EN3 ;MAIL MSG
  1. END ;EXIT PATH
  1. D MAIL
  1. K DA,DR,DIE,IEN,IEN1,IEN2,WD,WDN,WDA,WDAN,WD1,WD1N,WD2,WD2N,WD1A,WD1AN,WD2A,WD2AN,FIX1,FIX2,REDT
  1. Q
  1. MAIL ;Send results of Educ Topic fix in a mail message to initiator
  1. N I,XMSUB,XMTEXT,XMDUZ,XMY,DIFROM
  1. S XMSUB="Patch PX*1.0*157 Educ topic modification completed"
  1. S XMDUZ="Patch PX*1.0*157 Educ topic modify job"
  1. S XMY(.5)="" S:$G(DUZ) XMY(DUZ)=""
  1. S XMTEXT="^TMP(""PXTXT"",$J,"
  1. K ^TMP("PXTXT",$J)
  1. ; set up header and count
  1. S I=3
  1. S ^TMP("PXTXT",$J,1)="The modification of Education Topics: VA-Advanced Directives and"
  1. S ^TMP("PXTXT",$J,2)="VA-Advanced Directives Screening, has completed"
  1. S ^TMP("PXTXT",$J,I)="",I=I+1
  1. S ^TMP("PXTXT",$J,I)=""
  1. I FIX1=0 D
  1. . S I=I+1,^TMP("PXTXT",$J,I)=" *** ERROR ALERT ***"
  1. . S I=I+1,^TMP("PXTXT",$J,I)="Could NOT fix topic VA-Advanced Directives Screening, data did NOT "
  1. . S I=I+1,^TMP("PXTXT",$J,I)="match national data base"
  1. I FIX1>0 D
  1. . S I=I+1,^TMP("PXTXT",$J,I)=" *** CHANGED ***"
  1. . S I=I+1,^TMP("PXTXT",$J,I)="Modified topic VA-Advanced Directives Screening for verbiage"
  1. . S I=I+1,^TMP("PXTXT",$J,I)="correction where used"
  1. S I=I+1,^TMP("PXTXT",$J,I)=""
  1. I FIX2=0 D
  1. . S I=I+1,^TMP("PXTXT",$J,I)=" *** ERROR ALERT ***"
  1. . S I=I+1,^TMP("PXTXT",$J,I)="Could NOT fix topic VA-Advanced Directives, data did NOT"
  1. . S I=I+1,^TMP("PXTXT",$J,I)="match national data base"
  1. I FIX2>0 D
  1. . S I=I+1,^TMP("PXTXT",$J,I)=" *** CHANGED ***"
  1. . S I=I+1,^TMP("PXTXT",$J,I)="Modified topic VA-Advanced Directives for verbiage correction"
  1. . S I=I+1,^TMP("PXTXT",$J,I)="where used"
  1. D ^XMD ;send results
  1. Q