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

PXRMNOTE.m

Go to the documentation of this file.
PXRMNOTE ;SLC/AGP - Clincial Reminders tiu note protocol ;05/16/2022
 ;;2.0;CLINICAL REMINDERS;**78**;Feb 4, 2005;Build 10
 ;
EN ;
 N ACTION,NODE,PXRMDOCINFO
 N $ETRAP,$ESTACK
 S $ETRAP="G UNEXPERR^PXRMNOTE"
 S ACTION=$G(^TMP("TIUDOCACT",$J,"ACTION"))
 I ACTION="DELETE"!(ACTION="RETRACT") D
 .S PXRMDOCINFO("OLD","DFN")=$G(^TMP("TIUDOCACT",$J,"PATIENT"))
 .S PXRMDOCINFO("OLD","VISIT")=$G(^TMP("TIUDOCACT",$J,"VISIT"))
 .S NODE=$G(^TMP("TIUDOCACT",$J,"DOCUMENT"))
 .S PXRMDOCINFO("OLD","NOTE IEN")=$P(NODE,U)
 .S PXRMDOCINFO("OLD","NOTE NAME")=$P(NODE,U,2)
 I ACTION="REASSIGN" D
 .S PXRMDOCINFO("OLD","DFN")=$G(^TMP("TIUDOCACT",$J,"PATIENT","OLD"))
 .S PXRMDOCINFO("OLD","VISIT")=$G(^TMP("TIUDOCACT",$J,"VISIT","OLD"))
 .S NODE=$G(^TMP("TIUDOCACT",$J,"DOCUMENT","OLD"))
 .S PXRMDOCINFO("OLD","NOTE IEN")=$P(NODE,U)
 .S PXRMDOCINFO("OLD","NOTE NAME")=$P(NODE,U,2)
 .S PXRMDOCINFO("NEW","DFN")=$G(^TMP("TIUDOCACT",$J,"PATIENT","NEW"))
 .S PXRMDOCINFO("NEW","VISIT")=$G(^TMP("TIUDOCACT",$J,"VISIT","NEW"))
 .S NODE=$G(^TMP("TIUDOCACT",$J,"DOCUMENT","NEW"))
 .S PXRMDOCINFO("NEW","NOTE IEN")=$P(NODE,U)
 .S PXRMDOCINFO("NEW","NOTE NAME")=$P(NODE,U,2)
 S PXRMDOCINFO("ACTION")=ACTION
 D NOTEACT^PXRMDG(.PXRMDOCINFO)
 Q
 ;
UNEXPERR ;
 N %ZT,%ZTERROR
 S %ZT($NA(^TMP("TIUDOCACT",$J)))=""
 D ^%ZTER ;file error
 S $ECODE=""
 Q
 ;